Hello!
Here are the steps to replicate:
- Load the Aggregation column demo
- put the gantt instance in window:
gantt = window.gantt = new Gantt({
- Resize some columns in the left grid and move the splitter
- In the console, get a serialized state of that grid:
var x = JSON.stringify(gantt.subGrids.locked.grid.getState())
- Now resize some columns and move the splitter again
- In the console, restore the grid state:
gantt.subGrids.locked.grid.applyState(JSON.parse(x))
- This works fine. Now apply an insignificant change in the code panel to have the Gantt reloaded
- Try to apply the state to the grid again:
gantt.subGrids.locked.grid.applyState(JSON.parse(x))
Result:
- Only the splitter is restored, all the columns remain as they are
Expected result:
- All the columns widths are restored as well as the splitter position.
Now maybe I'm doing this wrong. I'm trying to save the currently shown columns and their widths, etc. I've also tried with gantt.subGrids.normal.grid.getState() and gantt.getState() with the corresponding applyState() but the results are a bit confusing, I mean not what I would expect. Like, applyState() on the locked grid also restores the timeAxis position?