Grid mutliple rows select
user-sg user-jl
it would be great to be able to select multiple rows and have that drive a list of variables, so {{stratName}} would become a List if I had selected multiple, or remain an Atom if just one selected.
This would help us slice & dice (e.g. aggregate over a subset of values, or compare 2 or 3 different things out of a larger set) without having to add a multi-select dropdown component, which takes up a fair bit of real estate.
Is that something that sounds feasible?
Great idea. I had a play with the idea and it is possible, there's one part that is a little weird. The highlighted rows are fixed by row position. e.g. You choose rows 3 and 5. If new data arrives, rows 3 and 5 stay highlighted. However the items "selected" would be whatever the value is when you last highlight a row. i.e. It won't get updated as new rows arrive and it may not be what you first clicked on for the earliest rows.
Implementation note to self, remove code:
grid.setActiveCell(args.row, args.cell); to allow row election model to work.
Maybe if you can detect the data has changed on-update - it deselects the rows and nullifies the in-scope variables?
For our use-case the data I have in mind wouldn't be changing very often.