Don't save searchpane visibility in statesave

Don't save searchpane visibility in statesave

PareshKumarPareshKumar Posts: 31Questions: 14Answers: 1
edited January 2022 in SearchPanes

Hi,
Is there any way where i can use statesave without saving searchpane visibility?
Thanks.

This question has an accepted answers - jump to answer

Answers

  • PareshKumarPareshKumar Posts: 31Questions: 14Answers: 1

    How do I hide a particular searchpane column based on condition with statesave as true?

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @PareshKumar ,

    Take a look at the stateSaveParams initialisation option. It allows you to manipulate the state data before it is saved - so you can do whatever you want with the SearchPanes state data.

    I'm happy to put a test case together for you, but I'll need some clarification on your above points! When you say

    without saving searchpane visibility

    Do you mean whether the panes are collapsed or not? Or their effect on the results in the table?

    And also for

    hide a particular searchpane column

    Again do you mean collapsed or not? Or do you never want that pane to be displayed?

    Thanks,
    Sandy

  • PareshKumarPareshKumar Posts: 31Questions: 14Answers: 1
    edited January 2022

    Hi @sandy thanks for the response.
    I want to hide/show a column in searchpane based on condition with statesave. Is that possible?
    Thanks.

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @PareshKumar ,

    As I said above, I'm not sure what you mean by this. Could you please link to a test case? That might make things easier! 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.

    Thanks,
    Sandy

  • PareshKumarPareshKumar Posts: 31Questions: 14Answers: 1
    edited January 2022

    @sandy as requested i have created a test case and added the link below.
    https://jsfiddle.net/PareshBafna/ka0g76yh/20/
    If i comment and uncomment the statesave, the searchpane doesn't work as required.
    Also, based on the condition, i need to hide/unhide columns in searchpane which doesn't work with statesave.
    Thanks,
    Paresh

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @PareshKumar ,

    I've updated your example to use the latest nightly build and statesave appears to be working fine there.

    SearchPanes will show a pane if it was shown in the last stateSave - am I right in thinking that you want to only show the pane based on the current initialisation rather than the previous state?

    If so, take a look at this example that makes use of stateLoadParams.

    Thanks,
    Sandy

  • sandysandy Posts: 913Questions: 0Answers: 236

    I should also note that we are looking to make a release for SearchPanes very soon.

    Thanks,
    Sandy

  • PareshKumarPareshKumar Posts: 31Questions: 14Answers: 1
    edited January 2022

    Hi @sandy, it's working fine with the nightly build and stateLoadParams.
    Thanks,
    Paresh

Sign In or Register to comment.