my button show length is on the right side and not on the left, how to change it?

my button show length is on the right side and not on the left, how to change it?

LucasBLLucasBL Posts: 6Questions: 1Answers: 0
edited September 2019 in Free community support

Good morning, I can not put LengthMenu to the left side of the page, at the moment it is not on the right side as shown in the picture, can you help me with this case?

  <script type="text/javascript">
        $(document).ready(function () {
            var table = $('#datatable').DataTable({
                select: true,
                dom: 'Blfrtip',
                lengthMenu: [
                    [10, 25, 50, -1],
                    ['10 Filas', '25 Filas', '50 Filas', 'Mostrar todo']
                ],
                dom: 'Bfrtip',
                buttons: [
                    { extend: 'pdf', text: '<i class="fas fa-file-pdf fa-1x" aria-hidden="true"> Exportar a PDF</i>' },
                    { extend: 'csv', text: '<i class="fas fa-file-csv fa-1x"> Exportar a CSV</i>' },
                    { extend: 'excel', text: '<i class="fas fa-file-excel" aria-hidden="true"> Exportar a EXCEL</i>' },
                    'pageLength'
                ],
            });
            table.buttons().container()
                .appendTo('#datatable_wrapper .col-md-6:eq(0)');
        });
    </script>

Answers

  • tangerinetangerine Posts: 3,348Questions: 36Answers: 394

    You have two dom settings. The second one is overwriting the first.

This discussion has been closed.