Filtering DOM Elements
Filtering DOM Elements
Hi,
i would like to filter/search for the contents of some DOM elements. I also implemented some custom sorting types (german date/ number format), but i think this doesn't matter here.
This DataTables-example exactly shows my problem:
http://datatables.net/release-datatables/examples/plug-ins/dom_sort.html
Try to Search for: "OSX" - > doesn't work.
Now sort the table based on the "Platform(s)" column.
Search for "OSX" again - > now it works!
Is there a way to make the search work before sorting the column?
Thank you!
Alex
i would like to filter/search for the contents of some DOM elements. I also implemented some custom sorting types (german date/ number format), but i think this doesn't matter here.
This DataTables-example exactly shows my problem:
http://datatables.net/release-datatables/examples/plug-ins/dom_sort.html
Try to Search for: "OSX" - > doesn't work.
Now sort the table based on the "Platform(s)" column.
Search for "OSX" again - > now it works!
Is there a way to make the search work before sorting the column?
Thank you!
Alex
This discussion has been closed.
Replies
This seems to apply here:
[quote]
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
[/quote]
:-)
So that's option 1.
Option 2 - call sort on the table to refresh the sort when you start filtering (bit ugly, but it would work as is)
Option 3 - use a custom filter that will search DOM elements - http://datatables.net/development/filtering .
I think option 1 is the most attractive. I'm not 100% sure I'll have time to get it into 1.9.3, but I'll certainly try!
Allan