Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row selection controllers #2

Open
andreypopp opened this issue May 7, 2014 · 1 comment
Open

Row selection controllers #2

andreypopp opened this issue May 7, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@andreypopp
Copy link
Contributor

We need to implement row selection controllers which would allow different models for selecting rows in a grid.

Features we want (these can be ended up in different row selection controllers implementations though):

  • Focus row with mouse
  • Move focus with keyboard
  • Select multiple rows with mouse
    • by holding a Shift key
    • in a special multiple selection mode
  • Remove focus with Esc key
@andreypopp andreypopp added this to the 0.1.0 milestone May 7, 2014
@andreypopp andreypopp self-assigned this May 7, 2014
@bakesteve
Copy link

I've been trying out a few solutions to moving focus with keyboard navigation
let me know if you had any thoughts on the right solution to this
My initial proof of concept was to store ActiveCell : { cell: 0, row: 0 } in state and then pass this down
didnt feel that neat, but the bulk of the approach can be seen here:
adazzle@15edb33

and its designed from an excel-style grid point of view, so wont cope with multiple selections, etc (though shouldn't be hard to extend that)

Also - for mouse selection of a cell, this will require the click handler to be aware of the row and cell indexes, and then pass this upto the owner of the grid state. So maybe a neater approach would be for the state of selection to be owned within a selection controller?
The issue there that stopped em going down that path is that you would probably want to do a few of the following:

  • mark a cell / row to indicate it is selected
  • do things in other controller with selected cell(s)/row(s), such as copy and paste, editors, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants