Use two extension at the same time
Use two extension at the same time

Hi,
i want to use SearchPane and Buttons in the same datatables.
I included all the necessary js and css files.
i used the following initialization with PBfrtip in dom , but the button doesn't show up:
var table = $('#result-list').DataTable({
searchPanes: {
layout: 'columns-4',
cascadePanes: true
},
buttons: [
'copy'
],
dom: 'PBfrtip',
columnDefs: [
{
searchPanes: {
show: true,
},
targets: [0, 2, 3, 6],
},
{
searchPanes: {
show: false,
},
targets: [1, 4, 5, 7, 8, 9, 10],
},
{
targets: [7, 9, 10],
visible: false
}
],
"initComplete": function (settings, json) {
$("#result-list_filter").append("<button id='search-advance' aria-controls='result-list' type='button' class='btn btn-outline-secondary btn-sm ml-1' aria-expanded='true' style='margin-top: -2px;'> Advanced</button>");
$('.dtsp-panesContainer').hide();
}
});
The search pane is working, but not button shown up... help!!
Answers
Do the buttons show if you remove the
P
fromdom: 'PBfrtip',
like thisdom: 'Bfrtip',
?The code snippet doesn't have anything obvious to indicate an issue. Can you provide a link to your page or reproduce the problem with a test case?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Do you see errors in your browser's console?
Kevin