Does SearchPanes honor the placement of the 'P' in dom?
Does SearchPanes honor the placement of the 'P' in dom?
Link to test case: Unable to provide link, pretty dependent on backend
Debugger code (debug.datatables.net): Ok that tool is awesome, ran it and am unable to upload for some reason, versions are up to date, no common issues found
Error messages shown: None
Description of problem:
I have a big table with lots of options and it works amazingly well! Kudos and thank you for all the work. I use SearchPanes and some users of smaller laptops have complained that the search panes force the data off screen, I told them to scroll down but they insist it would be nicer if it could be hidden.
So I thought no big deal, I'll use the dom option to wrap the P in some type of collapsible element, so I modify the dom property and it doesn't appear to honor the P placement. I've moved the P to first position, to last position and searchpanes doesn't change.
I even tried the searchpanes sample on the doc page
dom: '<"dtsp-verticalContainer"<"dtsp-verticalPanes"P><"dtsp-dataTable"frtip>>'
And that only wraps the datatable elements, the searchpane elements are still outside.
Hierarchy looks like:

My Included Libraries are:
* DataTables 1.13.3
* Buttons 2.3.5
* Column visibility 2.3.5
* Responsive 2.4.0
* SearchPanes 2.1.1
* Select 1.6.1
* StateRestore 1.2.1
* Bootstrap 5 Formatting
DataTable config is: https://gist.github.com/timthedevguy/1a48451dbccf68d6e97663f64913323e
Sorry, forums kept removing formatting ![]()
I'm wondering if I'm just using an option that cancels another option or something. Thanks for any help you can give.
This question has an accepted answers - jump to answer
Answers
It does appear to work okay in this little test case: https://live.datatables.net/lafotozi/1/edit .
Are you able to modify it in some way to show the issue you are seeing?
Thanks,
Allan
I may have a bigger issue because if I remove the P then it still appears. Thank you for the assistance, I'll see if I can did a little deeper and if I can't find anything then I'll try and spin up a demo site.
I'm so sorry for wasting your time, I found a line of code:
table.searchPanes.container().prependTo(table.table().container());That is why dom was ignored, and why removing P tag had no effect. Thanks so much and sorry again.
That would do it - that line of code was moving the element regardless of where it was originally placed.
No problem - glad you got to the bottom of it.
Allan