Search via API
Search via API
Hi,
i really fall in love with the new version of DataTables, but sometimes it is not clear how to use all the cool things right.
Actually i have a column with category icons and if i click on one icon the Datatable shows only the entries of this category.
In the old version i only write the category to the search text field. Actually i want to use the API for that.
this.dataTable.search(category).draw();
This line of code works great for the search, but the user has to enter something in the search field to reset the search. Is there an easy way to show the search term also in the search text field? I dont want to use jQuery to write the category in the text field. because then i dont need the API anymore.
And i think the usage of the API is better in that case.
BTW: Sorry for the bad english :/
This question has an accepted answers - jump to answer
Answers
Great to hear you like the new version of DataTables! :-)
However, you've found a bug there... Here is a little test case: http://live.datatables.net/vopifow/1/edit - in that example the search box should automatically be populated with the word 'Tiger'. I'll take a look into what is causing that, and post back here when I have a fix.
Allan
Great! So i was not to stupid :)
Thank you for your commitment.