Why "searchable: false" erase the data of the column?
Why "searchable: false" erase the data of the column?
Hi there,
I've this column settings:
columns: [
...
{ data: "ClinicID", title: "", visible: false, searchable: true },
...
]
I hidden the field, and I want to keep the value within it (because I use as pivot for other searches; i.e. its related to other data).
But:
- if I set
searchable: trueand I insert the ID, it filters also for that column on a Search input field (for example). - if I set
searchable: false, it empty the value, so I can't use it as pivot anymore.
What should I do?
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Setting the column's searchable flag to
falsecertainly shouldn't make the content invisible. Can you link to a page showing the issue please?Allan
I mean: setting searchable flag to
falsewill prevent to be searched by Search input field.But later, if I do somethings like this:
The field
data[columnID]data is always 0 for the columnID withsearchable: false, that's what I mean. I need to setsearchable: true(so it keep its value), but at that point it returns searcheable by Search input fieldAh - I see what you mean. The search plug-ins actually get passed more parameters, including the original data object for the column (4th parameter) which you could get the data from.
Allan
I see. That's perfect.

Unfortunately,
searchDatais "an array" (so I can access with [], and index).rowDatais an object, and I can't access to it using index/columnidIs there any workaround?
Thanks
The
rowDatais the original data object for what you use to populate the row. If that is an object, then yes, it would be an object. You could use$.mapto convert it to be an array if you need.Allan