expanded/collapsed state not restored on saveState.restore
#6,718 opened on May 4, 2018
Description
I traced the code in grouping.js and found the issue at line 808 when the applyRowExpandedStates is called, the first argument "grid.grouping.groupingHeaderCache" is an empty object.
My theory is that the grouping that was just applied a few lines above didn't apply yet and therefore the groupingHeaderCache was not yet set.
To prove my theory, i added a setTimeout to line 808 as follows:
if ( config.rowExpandedStates ){
setTimeout(function(){service.applyRowExpandedStates( grid.grouping.groupingHeaderCache, config.rowExpandedStates )});
}
and that made it work.
Can you guys look into this and provide a fix if this is indeed a bug? and I think it is because even on your tutorial page http://ui-grid.info/docs/#!/tutorial/208_save_state, the state of expanded rows is not restored. To reproduce it there, you need to group on a column, expand one and Save. Then ungroup and restore. .