Can I use the data found by the global search

Can I use the data found by the global search

TomBajzekTomBajzek Posts: 94Questions: 18Answers: 1

Is there a way for my program to access the results of a global search (i.e., using the search box)? What I want to do is to display images whose pointers are contained in the records of the result set of a search that the user does by entering something into the on-page global search box. I've found a lot of information about DataTables search but I don't think I've found how to do that.

This question has an accepted answers - jump to answer


  • kthorngrenkthorngren Posts: 4,584Questions: 19Answers: 1,008
    edited June 2018 Answer ✓

    Sounds like you want to use rows().data() with a selector-modifier of {search:'applied'}. You can use pluck() to get the particular column and toArray() if you want an array of data instead of an array of Datatables API objects.

    for example:

    Assumes you have a column named "images".


Sign In or Register to comment.