Coulmn Search in a not searchable column possible?

Coulmn Search in a not searchable column possible?

miwoemiwoe Posts: 14Questions: 2Answers: 0

Hi,

in the first instance, my question sounds strange, but

we have defined a column as not searchable because the full text search table.search(val) should not find any rows with the value in that special column, the column is also not visible.

In the use case we have also another column with a checkbox inside. If you click on the checkbox only those rows should be visible anymore with the same value in that hidden and not searchable column. We tried it witch table.column().search(val), but as the column is not searchable it returns an empty result.

Is there any other approach for doing this?

This question has an accepted answers - jump to answer

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Not with something basic like this

    What you could do, is create your own search function, to basically take a string value, then use the rows().every() to look for any row that has said value in the unsearchable column, returning only the row indexes with matches.. Then use the API again to redraw the table with only those rows visible

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin
    Answer ✓

    A search plug-in would probably be required if you mark a column as not searchable. Note that you would need to use the 4th parameter passed in since the search data is not populated for columns marked as not searchable.

    Allan

This discussion has been closed.