Don't save searchpane visibility in statesave
Don't save searchpane visibility in statesave
PareshKumar
Posts: 31Questions: 14Answers: 1
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
How do I hide a particular searchpane column based on condition with statesave as true?
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
Do you mean whether the panes are collapsed or not? Or their effect on the results in the table?
And also for
Again do you mean collapsed or not? Or do you never want that pane to be displayed?
Thanks,
Sandy
Hi @sandy thanks for the response.
I want to hide/show a column in searchpane based on condition with statesave. Is that possible?
Thanks.
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
@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
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
I should also note that we are looking to make a release for SearchPanes very soon.
Thanks,
Sandy
Hi @sandy, it's working fine with the nightly build and stateLoadParams.
Thanks,
Paresh