angular-table
angular-table copied to clipboard
multiple row selection
Edited title. Previous title: "multiple row selection isn't supported and it leaves visual cruft if you try to use it that way"
To reproduce:
- bring up sample table
- ctrl-click on a few rows by clicking cells in those rows
- note that only the last row is highlighted (ok)
- note that the cells you ctrl-clicked on are highlighted (not good)
Would be nice to have multiple-row selection though...use case would be "I want to select a bunch of rows to run an action button, e.g. delete, on".
Hi @kenyee , I can certainly see how that could be very useful. Would you use this in your app?
I'd use it in my accounts-admin-ui package...would allow multiple user deletes.
ok, awesome! let's brainstorm how it should work. how about a new attribute on
where "rows" was an array of the selected rows? Would that be ideal?
oh, and regarding the visual cruft currently, I believe you are just seeing the default text selection, which is a very similar color to the default row selection color.
Oh now I see...I should have tested in different browsers. I use FF normally (I know, Chrome is faster but my bookmarks are all in FF :-) On Chrome:
- ctrl-click does nothing special...no visual cruft
- shift-click is doing selection of an area of text across multiple rows and changes backgrounds into grey shades
On FF:
- ctrl-click leaves a dark blue outline around each cell (not row) you click on
- shift-click is doing selection of an area of text but the background stays white on MSIE:
- ctrl-click does nothing special...no visual cruft
- shift-click is doing selection of an area of text but the background stays white
Amusingly, MSIE looks like it does the right behavior :-)
As for the new attribute, I'd suggest adding a "multi-select" on the