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

Add Selection + Interactivity to Grid #100

Open
ecton opened this issue Dec 20, 2023 · 0 comments
Open

Add Selection + Interactivity to Grid #100

ecton opened this issue Dec 20, 2023 · 0 comments

Comments

@ecton
Copy link
Member

ecton commented Dec 20, 2023

On a quest to build a "listbox" type widget, I think the next step is to add a Dynamic<GridSelection> option to Grid.

  • A grid selection should be able to be a single cell, a row, or a column. Maybe an "all" as well (open to feedback).
  • A grid should have a setting as to whether clicking should do cell select, column select, or row select.
  • Clicking on a cell should invoke a "cell clicked" callback. The callback should return EventHandling so that selection can be manually implemented.
    • If IGNORED is returned, the grid selection mode should be used to map the clicked cell to the active selection.
  • Before cells are drawn, the highlight color should be drawn where the selected cells are located. If possible, a single rectangle should be drawn.

One last thing to consider is whether the Grid should associate a style component so that widgets can behave differently when they are in a selected cell in a grid. On one hand, it sounds useful. On the other hand, it sounds like a little too specific of a behavior to be encouraging widgets to perform with each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant