colVis + colReorder + stateSave
colVis + colReorder + stateSave

Hello,
Have you found a compatibility solution between colVis, colReorder and stateSave?
Here's an example of the issue:
Initial load:
3 columns: '1', '2', '3'
User actions:
Reorder: '1', '3', '2'
Hide column '3': '1', '2'
After reload:
Displayed columns: '1', '3' (instead of '1', '2')
The saved state doesn't correctly restore the combination of reordering + visibility.
Best regards,
Answers
Just tested it with my own data tables application - and it worked perfectly fine. The reordered columns were in the right place and the hidden column was still the correct one.
Can you post a test case please highlighting the issue.
Hello,
Test case: https://live.datatables.net/gigegefu/2/
Steps to reproduce:
Initial state
Order: "Name", "Position", "Office", "Age", "Start date", "Salary"
→ Save as "State 1"
Swap two columns
Move "Position" and "Office" to get: "Name", "Office", "Position", "Age", "Start date", "Salary"
→ Save as "State 2"
Hide a column
Hide "Office" to get: "Name", "Position", "Age", "Start date", "Salary"
→ Save as "State 3"
Test state restoration
Load "State 1" → ✓ OK: "Name", "Position", "Office", "Age", "Start date", "Salary"
Load "State 3" → ❌ ISSUE: "Name", "Office", "Age", "Start date", "Salary"
Load "State 2" → ✓ OK: "Name", "Office", "Position", "Age", "Start date", "Salary"
Load "State 3" → ✓ OK: "Name", "Position", "Age", "Start date", "Salary"
Expected result: When first loading "State 3", the order should be "Name", "Position", "Age", "Start date", "Salary"
Actual result: The "Office" column appears in place of "Position"