Searchbuilder result + select all + editor button edits the unfiltered data table
Searchbuilder result + select all + editor button edits the unfiltered data table

Link to test case: https://daidev.oliverdbconsulting.com/pfl/pfl-cop30-t-12-1-SEARCH.html
Debugger code (debug.datatables.net): n/a
Error messages shown: n/a
Description of problem: After using searchbuilder to filter the displayed rows, then using the built-in Select All button, if I copy or export, I get the expected, filtered set of rows, but if I open with Editor button, and make a multi-edit, it is applied to all of the rows (as if Searchbuilder criteria not applied).
This question has an accepted answers - jump to answer
Answers
Looks like this occurs in example code as well, without using the searchbuilder extension:
https://editor.datatables.net/examples/extensions/import.html
(if you type a search criteria in box, then select all, then edit, it will be editing all rows not just the ones meeting search criteria. If you instead Export CSV it will only have the search criteria rows).
The
selectAll
docs state this:You could create a Custom Button and use
rows().select()
with theselector-modifier
of{search: 'applied'}
to select the rows based on the search results.Kevin
Thank you! Below is how I did that if it helps someone else just starting out:
{
text: 'Select Current',
action: function (){
table.rows({search: 'applied'}).select()
}