SearchPanes 0.0.1 to 2.3.3 upgrade issue (DataTables 1.13.11)
SearchPanes 0.0.1 to 2.3.3 upgrade issue (DataTables 1.13.11)
We've been happily using SearchPanes 0.0.1 for a number of years now, but we want to catch up to the 1.0.0 release.
This block of code no longer works:
searchPane: {
threshold: 0,
columns: filterableIndexesArray,
container: '#subFilters' + index + ' div.panel-body'
}
Can anyone point me to the 1.0.0 way of achieving this/help me to rework it? I've scoured the help, but nothing has worked so far. The panes were positioned outside of the DataTable, and there can be multiple datatables per page.
The following (work-around?) worked for re-positioning the panels, but it won't work for multiple datatables:
$('#subFilters' + index + ' div.panel-body').append($('.dtsp-panesContainer'));
I appreciate any help offered, as I've spent way too long on this already.
Thanks
Answers
Possibly this example will help. Maybe use
initComplete
to place the SearchPanes container. For example:You may need to adjust the code for your specific environment. For example, I'm not sure what
index
is and where it is set in relation to the Datatable initialization.If you need help with this then please build a simple example that replicates a couple Datatables so we can provide more specific suggestions based on your environment.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I'm not sure what SearchPanes 0.0.1 used for the SearchPanes config option but its
searchPanes
notsearchPane
as you have above. Note the trailings
.Kevin
Looking back at the old blog post I think it was
searchPane
and it was updated when it was more robustly implemented.Allan
Thanks all, I managed to get everything up and running again. The later 2.3.x release do seem to have a number of issues, though. I'll find time to raise them asap.