Skip to content

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 #6949

Open
@wlterencetan

Description

@wlterencetan

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions