how can I tigger a search in the searchPanes extension?
how can I tigger a search in the searchPanes extension?
alhuber1502
Posts: 9Questions: 3Answers: 0
Is there a way to programmatically launch a search in a searchPane (that would result in the row in the searchPane to be selected as if it had been clicked on), something analogous to
table.columns(9).search( 'term' ).draw();
but within the searchPanes? Many thanks!
This question has an accepted answers - jump to answer
Answers
See this thread. Even though its a year old I believe the answers still apply. The example in the thread shows how it can be done. But programmically finding the correct search pane and find the correct row to select would take a lot of work.
Kevin
Thanks, @kthormann !
This doesn't seem to work with long searchPane tables, as they're not automatically loaded into the DOM on init. I don't suppose there's a way to enforce this?
Thanks!
Apologies for misspelling your name, @kthorngren !
Instead of using this to find the row:
You can use
row()
with arow-selector
as a function to find the row. For example:https://live.datatables.net/pafizoxu/10/edit
Kevin
Ah, that works perfectly. Thank you so much, @kthorngren !