Selected row(s) loses "selected" class on grid redraw
As demonstrated in this plunk: http://run.plnkr.co/plunks/Nsy6iz/
Resizing the browser, opening the console, etc., causes selected rows to lose their "selected" class.
This happens on all of the demos actually. http://angular-ui.github.com/ng-grid/
@specialjyo True, I just wanted to provide some directions to reproduce.
It looks like this is because in grid.setRenderedRows(), it uses row.setVars() to overwrite .selected in the renderedRows with what's in filteredRows. As near as I can tell, .selected never gets set in filteredRows, ONLY in renderedRows. So when you redraw the grid, you lose your selection.
in order to maintain selections you need to use a primayKey please see: https://github.com/angular-ui/ng-grid/issues/233
Like so? http://plnkr.co/edit/FYfkY8
It doesn't seem to work with the current ng-grid.debug.js
Edit: Actually plunker is being really wonky. I will try to get a jsfiddle set up.
I updated from ng-grid 2.0.2 to 2.0.3 and i'm having the same problem.
Fantastic, Tim. Thank you!
This issues is still in the last version