More input on search
More input on search

Hi,
i need to add another search input. I have something like that:
The goal is: "Input Search 1" search only on columns A, B and C, instead "Input Search 2" search only on column D with these conditions:
1) If Seach1 == "" AND Search2 == "", return all rows;
2) If Seach1 != "" AND Search2 == "", return rows with search only on columns A,B,C
3) If Seach1 == "" AND Search2 != "", return rows with search only on search only on D
4) If Seach1 != "" AND Search2 != "", return rows with search on columns A,B,C AND column D
I provide a test case:
http://live.datatables.net/zimamiwe/4/edit
When the page is reloaded or a column is sorted, the search is reset. How i can save and preserve the state (search, sorting, etc..) like a default search?
Unfortunately, I can't use a multiple individual column searches or SearchsPanes.
thanks
This question has an accepted answers - jump to answer
Answers
Don't pop the search plugin. If you pop it then it won't be active for the next draw like sorting, etc. Push it once so it runs for each table draw. Your updated example:
http://live.datatables.net/zimamiwe/5/edit
Kevin
Thank you for reply.
I have solved also the problem with page reload adding extra custom parameters with stateSaveParams and stateLoadParams:
http://live.datatables.net/zimamiwe/10/edit
Sorry, I missed that part
Glad you got it all working.
Kevin