Possible Bug: removeAllStates does not remove all states in stateRestore
Possible Bug: removeAllStates does not remove all states in stateRestore
trongart
Posts: 222Questions: 51Answers: 0
in StateRestore
removeAllStates
does not remove all states stored within stateRestore:
Example issue:
In the Remove All Button example:
1) sort Age, create state
2) sort Office, create state
3) sort Salary, create state
Saved States will have 3 states saved
4) Click on Remove All States
-> State 2 still remains (Saved States button collection should be empty instead)
This question has an accepted answers - jump to answer
Answers
Yep, I'm seeing that, thanks for reporting. You can even just click "Create State" three times, and the second will be left intact. I've raised it internally (DD-2495 for my reference) and we'll report back here when there's an update - probably tomorrow.
Cheers,
Colin
Hi @trongart ,
That should be the issue fixed now. This will be available in the next SearchPanes release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds.
Thanks,
Sandy
Hi @Sandy, thank you very much! Just to confirm, the SearchPanes library is now required to use the
removeAllStates
functionality of searchRestore? As this library is not used in your example for this: https://datatables.net/extensions/staterestore/examples/initialisation/removeAll.htmlNo! Sorry I wrote the wrong extension totally!
It will of course be in the StateRestore release, which is this nightly build.
Thanks,
Sandy
@sandy No problem! Thank you so much- I think the correct link is: https://nightly.datatables.net/staterestore/js/dataTables.stateRestore.js