ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

After saving a state using saveState.save(), when restoring back after multiple events (e.g. adding a filter and reordering columns), restoreState does not fully restore back to the original saved state

Open wlterencetan opened this issue 5 years ago • 1 comments

This is occurring on the tutorial for this functionality as well (Tutorial 208 link: http://ui-grid.info/docs/#!/tutorial/Tutorial:%20208%20Save%20and%20restore%20state)

Steps to recreate the issue (Referring to the tutorial's example):

  1. Save the current UI Grid state. Current state is:
  • Name as column 1
  • Gender as column 2
  • Company as column 3
  1. Add a filter to the 'Gender' column (e.g. 'f' in the filter's field)
  2. Reorder one of the columns (e.g. re-order the 'Gender' column as column 3)
  3. Click on restore button, running saveState.restore.
  4. Column order does not restore to the state as described in step 1. In this example, filter is removed, but column remains in the same changed order from step 3.

Grid state can be fully restored after a 2nd call to the restore() function, but ideally this should not need to happen. Also, doing so and continue editing the filters seems to affect the state of the columns (e.g. change the ordering from its original state).

Attached a MKV video file (Zipped) detailing the steps performed using the UI Grid tutorial 208 as the example. Currently have angular-ui-grid version 4.7.1 running on my application.

ui-grid-restore-state-issue-2019-03-21_11.36.52.zip

wlterencetan avatar Mar 21 '19 00:03 wlterencetan

regex conditions are not saved/restored either.

the6thBook avatar Oct 02 '19 00:10 the6thBook