Search via API

Search via API

markusguenthermarkusguenther Posts: 4Questions: 2Answers: 0
edited May 2014 in DataTables 1.10

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

  • allanallan Posts: 61,762Questions: 1Answers: 10,111 Site admin
    Answer ✓

    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

  • markusguenthermarkusguenther Posts: 4Questions: 2Answers: 0

    Great! So i was not to stupid :)

    Thank you for your commitment.

This discussion has been closed.