Is there an API call that will update DataTables search index based on changes to data-search
Is there an API call that will update DataTables search index based on changes to data-search
I'm using a JQuery plugin (JQuery tagsInput) that allows users to specify keywords in one of the columns. These keywords are apparently not searchable by DataTables after a user adds keywords because when I try searching for newly added keywords it does not find them. I am therefore writing the keywords to the data-search attribute of the cell in question, but again DataTables does not find the row when searching for newly added keywords. How can this be done, please?
This question has an accepted answers - jump to answer
Answers
Use the
rows().invalidate()
method to invalidate the data DataTables has cached, so it will be re-read from the DOM.Allan
Thanks, Allan! That worked perfectly!