stateSave and multiple tabs
stateSave and multiple tabs
I'm having a table with 3 tabs. I would like to save the sort order for each tab.
I have added
stateSave: true
to my DataTable.
Now I do save the sort order, but it is "reused" for each tab, which somehow overrules the visibility of my columns, so columns which are supposed only to be visible in one tab, now are visible in all tabs.
How do I save the state for each tab individually?
and if this isn't possible, can I set options to stateSave, so it only saves sort order and not filter?
Sorry for not providing a test case, but I hope it's a fairly simply issue of (knowing and) setting the right options, if not I will try to provide more info.
Kind regards
Anja
This question has an accepted answers - jump to answer
Answers
Hi @Anja_R ,
The tabs aren't that straightforward, I'm afraid, as each tab is likely to be a different table - see this example here. Depending upon how you implemented it, would depend upon the solution to the problem.
That said, you can use the
stateSaveParams
to modify the data being saved, or you could fiddle withstateLoadParams
and remove options you don't want.Cheers,
Colin
I ended up using the following, where tabType is a uniq identifier for my tabs
Excellent, glad all working