_aFilterData being null?
_aFilterData being null?
Hi,
I can't figure out why in the following test case the _aFilterData is null? You can see in the console of the browser that the following line: col_inner_elements = data[j]._aFilterData[column_number_filter]; throws an error and I can't figure why? isn't the ._aFilterData should contain the rendered output of the cell?
While in the other test case every thinkg works as expected - ._aFilterData does hold the rendered value
p.s
I'm the author of the yadcf plugin
Thanks ahead
This question has an accepted answers - jump to answer
Answers
Hi Daniel,
That internal property will be
null
if the data for that row has either been invalidated, or not yet requested for that data type.This is how DataTables gets the filtered data internally.
It sounds like your code is attempting to get the data before DataTables has done its own filtering (and thus resolved any invalidated rows).
Allan
Thanks,
I've added 10 seconds delay (see updated test case) but still the result is the same, its null, Any ideas on how to solve it? because the two test cases looks the same more/less, but still in the first test case the _aFilterData is null?
Yup - sorry. I should have spotted this earlier. You have:
So DataTables doesn't do any filtering, and doesn't bother to populate the filtering information since it doesn't do any filtering!
You need to have that option enabled. Use
dom
if you don't want the default filtering input (which your example already has).Allan
Ohhhh.....
How could I miss that one :|
Thanks @allan !
Same way I did. We look at too much code :-)