Search in current page using Datatables.row('#id',{page:'current'}) seems to search whole table
Search in current page using Datatables.row('#id',{page:'current'}) seems to search whole table
Link to test case: https://jsfiddle.net/6u45eahd/1/
Debugger code (debug.datatables.net):
Error messages shown: None
Description of problem:
I need to check to see if a row with an known ID is present on the page that datatables is currently displaying
I'm using the following code
let target = table.row('#'+ ns.currentClientId, {page:'current'});
When I look at target.data() it always seems to contain the row identified by the "id" column, regardless of whether it is on the currently displayed page or not.
Am I misunderstanding / misusing the API?
Answers
I think because you're explicitly asking for a record, it's ignoring the fact that it's not on that page. Probably the easiest way would be to do something like this:
See here,
Colin