How to display search results created *outside* DataTables?

How to display search results created *outside* DataTables?

swincswinc Posts: 2Questions: 0Answers: 0

My app calculates the results of a row search (more accurately, filter) outside of the DataTables instance because the results need to be available to multiple components.

The search results are always a subset of the original rows DataTables displayed.

What is the best way to get DataTables to display these results? Search plug-ins cannot be passed the results as a parameter and don't appear to have access to information beyond the DOM. (Search results are not available in the DOM.)

Currently, the app simply clear()'s all the rows in the DataTables instance and then re-add()'s the subset data as if I were creating a new table. Not ideal, and I'm worried about performance.

I love DataTables. Is there a better way?

This discussion has been closed.