angular-ui/ui-grid

Filtering a row does not deselect it

Open

#5.170 geöffnet am 26. Feb. 2016

Auf GitHub ansehen
 (4 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (2.496 Forks)batch import
help wantedtype: enhancement

Repository-Metriken

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

Beschreibung

If you select a row, then filter it out, the row remains selected. Not sure if this is actually a bug, but it does not seem to be intuitive default behaviour.

For example, you select a number of rows, then set a field which causes them to be filtered. Then, later you select some other rows, and delete them. This will also delete the non visible rows.

This has the added effect of making getSelectedRows() unusable when using filtering, instead you must use getSelectedGridRows(), and filter out the visible rows, then map to a list of entities.

In my current project I have added a row processor to remove selections when rows become non-visible. I suggest this should be default behaviour, or have some additional documentation.

Contributor Guide