How to do individual column filters with state save?
How to do individual column filters with state save?
I have upgraded from an older version of DataTables (1.9.4) to the newer (v-1.10.12).
In my tables I used to use the ColumnFilter to set searchable fields on individual columns.
I can't find any documentation in the newer DataTables for this except for - "Individual column searching (text inputs)"
Link:
https://datatables.net/examples/api/multi_filter.html
I also am using state save on my DataTables.
My problem is that if I filter a column and then leave / refresh the page, the state save works, but the filtered column has its original placeholder text in it so the end user does not know it is being filtered.
As I have taken this code directly from the DataTables site I am assuming someone must have came across this problem at some point.
Is there any fix or workaround for this?
Thanks in advance,
Andrew
Answers
The example you linked doesn't support stateSaving at the moment. The filtering state is saved, but it won't restore the value into the input / select when the page is reloaded
You have two options-
state.loaded()
to get the loaded valuesThanks
Tom