BUG? - Individual column searching
BUG? - Individual column searching
Hi,
I'm using DataTables + Bootstrap 3
jquery-1.12.4.min.js
bootstrap.min.js (3.3.6)
jquery.dataTables.min.js (1.10.12)
dataTables.bootstrap.min.js (1.10.12)
bootstrap.min.css (3.3.6)
dataTables.bootstrap.min.css (1.10.12)
I also use:
- Internationalisation plug-ins: Italian language
- Individual column searching (text inputs)
- Scroll - vertical, dynamic height
- State saving
I have this problem:
1) If I use general search is OK, but if I use a column search i have no data
2) If I use general search and then i reload the page is OK, the state is saved (State saving). If I use column search and then reload the page the state is saved but not display: I see the table filtered but not the value in the filter.
Answers
This is expected. The filtering inputs are not something DataTables has any knowledge of - you call the
column().search()
method from them, but that could be from anywhere), therefore it doesn't (and can't) have the ability to reinsert the values into the inputs.Since you create the input elements, you also need to populate them (if required). The
state.loaded()
method can be used to obtain the saved state and then populate the inputs.Allan