Filtering on form elements
Filtering on form elements
Hi there,
I have a table with a column that contains a text box. I'm interested in filtering on the contents of the text box. My table is very similar to the example at http://www.datatables.net/examples/plug-ins/dom_sort.html.
Filtering works, but only after I've sorted on the column that contains the text box. I've implemented sorting as shown at http://www.datatables.net/plug-ins/sorting#functions_data_source, which according to the documentation, will "update the cached data in DataTables". Is there any way I can update the data on the page load, so filtering works immediately?
By the way, the example at http://www.datatables.net/examples/plug-ins/dom_sort.html has the same behavior. Steps to reproduce:
1) Open the example page, and immediately type [quote]win 98[/quote] (which is intended to match on the "Platform(s)" column) into the search window.
2) No results are returned. Clear the search box.
3) Sort on the Platform(s) column.
4) Type win 98 again into search field. The results now display correctly.
Any help is appreciated. Thanks!
I have a table with a column that contains a text box. I'm interested in filtering on the contents of the text box. My table is very similar to the example at http://www.datatables.net/examples/plug-ins/dom_sort.html.
Filtering works, but only after I've sorted on the column that contains the text box. I've implemented sorting as shown at http://www.datatables.net/plug-ins/sorting#functions_data_source, which according to the documentation, will "update the cached data in DataTables". Is there any way I can update the data on the page load, so filtering works immediately?
By the way, the example at http://www.datatables.net/examples/plug-ins/dom_sort.html has the same behavior. Steps to reproduce:
1) Open the example page, and immediately type [quote]win 98[/quote] (which is intended to match on the "Platform(s)" column) into the search window.
2) No results are returned. Clear the search box.
3) Sort on the Platform(s) column.
4) Type win 98 again into search field. The results now display correctly.
Any help is appreciated. Thanks!
This discussion has been closed.