Matching Against Filtered Out Data
Matching Against Filtered Out Data
thecountofzero
Posts: 21Questions: 0Answers: 0
When using filtering, DataTables removes the rows that don't match the filter from the DOM.
This make it very difficult to perform operations on those rows.
For example, if I have a table with 10 rows of students (name, age, major, sex) and I am currently filtering on sex so that the DataTable is only showing males. If there were 8 males, then the DataTable would have 8 rows.
If I then execute a jQuery selector to find all rows that have a major of "Computer Science", it will only be matching against the 8 rows in the DOM.
Is there a way that I can get it to also match against hidden (filtered out) rows?
Instead of removing rows that don't match a filter from the DOM, can they be set to "display: none" or something similar?
Just wondering.
Thanks,
Mike
This make it very difficult to perform operations on those rows.
For example, if I have a table with 10 rows of students (name, age, major, sex) and I am currently filtering on sex so that the DataTable is only showing males. If there were 8 males, then the DataTable would have 8 rows.
If I then execute a jQuery selector to find all rows that have a major of "Computer Science", it will only be matching against the 8 rows in the DOM.
Is there a way that I can get it to also match against hidden (filtered out) rows?
Instead of removing rows that don't match a filter from the DOM, can they be set to "display: none" or something similar?
Just wondering.
Thanks,
Mike
This discussion has been closed.