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

pangelinopangelino Posts: 9Questions: 3Answers: 0

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

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    Answer ✓

    Use the rows().invalidate() method to invalidate the data DataTables has cached, so it will be re-read from the DOM.

    Allan

  • pangelinopangelino Posts: 9Questions: 3Answers: 0

    Thanks, Allan! That worked perfectly!

This discussion has been closed.