angular-ui/ui-grid

Adding a row changes the selected cell with ui-grid-cellNav

Open

#4.738 geöffnet am 20. Nov. 2015

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.496 Forks)batch import
good first issuegrid-cellNavhelp wantedtype: bug

Repository-Metriken

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

Beschreibung

Hi,

I've spotted a bug when I use ui-grid-cellNav and try to add a new element to the data. This bug only happens when the new element is added on top of the grid, and when it's done, the class "ui-grid-cell-focus" doesn't move with its matching cell and thus highlights the wrong element.

Check this plnkr : http://plnkr.co/edit/MFywMvsLDRvK8PMq1I6m It's already sorted by ID.

  1. Select "Bender Jefferson" cell
  2. Click Add row - it will duplicated the first entry
  3. The class "ui-grid-cell-focus" remained on the same cell so its now highlighting the wrong element.
  4. Click on "Get current focused cell" and check that thw row number doesn't match.

Contributor Guide