angular-ui/ui-grid

Restore state only works if the grid has the ui-grid-cellNav attribute

Open

#5.640 geöffnet am 24. Aug. 2016

Auf GitHub ansehen
 (0 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)JavaScript (2.496 Forks)batch import
good first issue

Repository-Metriken

Stars
 (5.395 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

The restore state feature does not work, if you remove the ui-grid-cellNav attribute from the grid. It seems like there is a dependency between ui-grid-save-state and ui-grid-cellNav.

You can recreate this issue with the following Plunker, which is based on the tutorial (http://ui-grid.info/docs/#/tutorial/208_save_state): http://plnkr.co/edit/SopQvxj9uKKZezxvr3pQ?p=preview

  1. Press "Save" button.
  2. Scroll down a bit.
  3. Press "Restore" button.
  4. The scroll position is restored. --> correct!
  5. Remove the ui-grid-cellNav attribute from the grid (or use this Punker: http://plnkr.co/edit/Bo0DKZOpQxMBS2FlPwyq?p=preview).
  6. Repeat steps 1-3.
  7. The scroll position is not restored. --> bug!

As far as I can say, the save state feature still works, but I'm not 100% sure. I need to use the save/restore state feature, but I do not want to have each cell selectable. That's why I can not add the ui-grid-cellNav attribute to my grid.

Contributor Guide