searchPanes button to filter across all columns

searchPanes button to filter across all columns

AlessandrovaAlessandrova Posts: 11Questions: 2Answers: 0

I added a button to open the dialog in order to filter across all columns.

So far, my code is this:

<script>
$(document).ready(function() {
    var dt = $('#myTable').DataTable( {

        buttons:[
            {
                extend: 'searchPanes',
                config: {
                    cascadePanes: true,
                    viewTotal: true,
                orderable: false
                }
            }
        ],
        searchPanes: {
          viewTotal: true,
          orderable: false
        },
        dom: 'Bfrtip',

        select: {
            style:    'os',
            selector: 'td:first-child'
        },
        order: [[ 1, 'asc' ]]
    });

    dt.on('select.dt', () => {          
        dt.searchPanes.rebuildPane(0, true);
    });

    dt.on('deselect.dt', () => {
        dt.searchPanes.rebuildPane(0, true);
    });
});
</script>

I only get filters for two of the five columns I would like to consider.

Here is the URL:
http://trovawiki.altervista.org/museo_diocesano.php

Am I doing anything wrong?

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.