stateRestore - Bug with similar states (not equal states), multiple states show active

stateRestore - Bug with similar states (not equal states), multiple states show active

glimpsed_chaosglimpsed_chaos Posts: 140Questions: 30Answers: 4
edited July 18 in Free community support

Link to test case: https://live.datatables.net/kufogowi/1/edit
Description of problem: My test case is just to prove it out / recreate the problem. I have steps for recreating the problem there as well.

Essentially, if you create a state such as ordering by a column, then create another state that orders by the same column and an additional column then click Saved States, you can see it show BOTH states as active.

This should not be, since these are two different states.

I noticed this with SearchPanes active and trying to create different states with selections for a pane.

This can be recreated on the SearchPanes example as well by selecting "Chief Executive Officer", save state. Then selecting "Chief Executive Officer" and "Customer Support", save the state. Open the Saved States and see both states are active. -https://datatables.net/extensions/staterestore/examples/integration/preDefinedSearchPanes.html

Even the most basic example does this - https://datatables.net/extensions/staterestore/examples/initialisation/simple.html

This should mean there is a problem with the core stateRestore and not just something in the SearchPane usage.

This question has accepted answers - jump to:

Answers

  • glimpsed_chaosglimpsed_chaos Posts: 140Questions: 30Answers: 4

    Apologies for bumping. But hoping to get some traction on what may be a bug or at least unintended behavior and how to resolve if possible.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Hi,

    Sorry for the delay in replying here! I agree, there is an error in the state comparison. I'll look into it just now.

    Allan

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Fix committed here. The nightly will rebuild with the fix soon (you might need to add a cache busting query parameter), and the change will be in the next release.

    Thanks for flagging this up and letting me know about it.

    Allan

Sign In or Register to comment.