Date range filters based on yadcf changing default values.
Date range filters based on yadcf changing default values.
Marcin1
Posts: 6Questions: 3Answers: 0
I use dataTable with date range filters based on yadcf. When user change webpage and come back to a webpage with filters there are still old filters values. I have created JS function to reset yadcf filters. Problem is that datatables fires an ajax and then this function is called.
My question is: how to call my function to change default filters values and then fire the ajax?
This discussion has been closed.
Answers
Hi @Marcin1 ,
The only way I can think that previous values are being stored is if
stateSave
is enabled.We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi @Colin,
Yes, you are right! All the states from e.g. pagination, search, filters were stored in a web storage. Wich is depended on
stateSave
attribute. I have set up it tofalse
. Also, I have set up initial filters inDataTables
.All work fine now.
Thank you Guys again!
Marcin1