Why does not search work inside the collapsed data?
Why does not search work inside the collapsed data?
onkar4in
Posts: 4Questions: 2Answers: 0
I have created a table with reference to link below
https://datatables.net/examples/api/row_details.html
when I expand the first row, "Name: Airi Satou" , the extension number is 5407
If I search for 5407 in the search box, I get "No Matches found".
Can you please let me know if there is any solution for this? Doesn't search work in the collapsed columns?
This question has an accepted answers - jump to answer
Answers
The data you are searching on needs to be in a column. In the example you link to, you would just have a hidden column with the extension number in it.
Otherwise, DataTables doesn't know anything about the extension numbers. It is only used in a custom renderer in that example.
Allan
Thanks Allan for quick response. Is there anyway by which we can search extension number also? the data which is not in the column?
Add a column, for the extension number, to the table and use
columns.visible
to hide the column. This will allow Datatables to search for the extension.Kevin
thanks kthorngren
If you use the responsive extension to create child rows you don't have the problem by the way. Columns hidden by the responsive extension are searchable.
https://datatables.net/extensions/responsive/examples/initialisation/option.html