Invalid searchPanes options should not be restored from stateSave

Invalid searchPanes options should not be restored from stateSave

pgerundtpgerundt Posts: 90Questions: 13Answers: 2

Hi guys,

another one to go:

1) Load the page and select a searchPane filter option
2) Reload the page
-> "No matching records found"

searchPanes options from the previously saved state should not be set if this option is no longer present.
(eg. having a table with dynamically removed rows.)


This question has an accepted answers - jump to answer


  • colincolin Posts: 15,031Questions: 1Answers: 2,570
    Answer ✓

    Yep, that's a pretty convincing test case, thanks for that. I've raised it internally (DD-2516 for my reference) and we'll report back here when there's an update.



  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pgerundt ,

    Sorry for the delay in getting this fix made. That should be the issue fixed now as you can see at this example. 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.


  • tefdattefdat Posts: 42Questions: 7Answers: 3

    for me the v2.0.2 does not work. I have exactly the same case / issue.
    1)If keepStates is On
    2)if I a put something in one of the searchPanes filter
    3)reload page -> "no matching records found"

    After reload you dont see even the search term in searchPanes filter.
    It seems, thats this is been stored here:

    A workaround which can be executed on page reload:

                        const locStorage = { ...localStorage };
                        Object.entries(locStorage).forEach(([key, value]) => {
                            if (key.includes('DataTables_DataTables_Table_')) {
                                let val = JSON.parse(value);
                                localStorage.setItem(key, JSON.stringify({ ...val, search: { search: '' } }));
  • allanallan Posts: 60,345Questions: 1Answers: 9,804 Site admin

    Have you tried the nightly version?


  • tefdattefdat Posts: 42Questions: 7Answers: 3

    To be honest, no. I took the latest release DT v1.12.1 from 19th May, which appeared after Sandy's post. I probably ignored that the release of DT has nothing to do with the searchPanes release.)
    I just compared the Nightly with Winmerge; oh yes, a lot has changed. I'll try it later. Ashes on my head.

  • tefdattefdat Posts: 42Questions: 7Answers: 3

    @allan sorry for offtopic - is there a kind of issue tracker or a draft release note for the nightlys of DT and its extensions available public?

Sign In or Register to comment.