Searchpane issue, showing below table

Searchpane issue, showing below table

davidjmorindavidjmorin Posts: 101Questions: 31Answers: 0

Using a searchpane and it is showing below the table. How can I have it so that it pops under the button like in the examples?

<script type="text/javascript" class="init">
$(document).ready(function() {
  $('#PPchangeAct').DataTable( {
    "order": [[ 8, "desc" ],[ 0, "asc" ]],
      dom: 'Bfrtip',
      responsive: true,
      language: {
        searchPanes: {
               clearMessage: 'Clear All',
               collapse: 'Filter',
               cascadePanes: true,
               viewTotal: true,
               layout: 'columns-2',
           },
      search: "_INPUT_",
      searchPlaceholder: "Search Records"
          },
      columnDefs: [ {
        targets: [0,1,2,3,4,5,6,7,8,9],
        createdCell: function (td, cellData, rowData, row, col) {
            if ( rowData[9] === 'Yes' ) {
                $(td).css('background-color', '#3CB371');
                $(td).css('color', 'white');
            }else{$(td).css('background-color', '#DCDCDC'); }
        },

        searchPanes:{
          show: true,
        },

        targets:[2],

      },


      {
          searchPanes: {
              show: false,
          },
          targets: [1,3,5,6,7,8,9],

    } ],
      buttons: [
        {
            extend: "searchPanes",
            text: "Filter",
        },
          { extend: 'csvHtml5',
          footer: true,
          text:   'Export Data',
          filename: function(){
                     var d = new Date();
                     month = '' + (d.getMonth() + 1),
                     day = '' + d.getDate(),
                     year = d.getFullYear();
                     var n = d.getTime();
                     var now = new Date();
                     var months = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];
                     var formattedDate = now.getFullYear() + months[now.getMonth()] + now.getDate();
                     return 'Price Plan Activations - ' + formattedDate}

         },
      ]
  } );
} );


</script>

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.