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
Usage Example - Multiple select combo box with shift click/enter for group selection #1499
Labels
Comments
Hi @daniel-a-marshall, I think it's a great example to add both to the docsite and to the examples repo. I will review if you want to create PRs to merge this example in the repos. Some things to consider in the example:
Otherwise, I love your example! I hope to have it in our repo examples and docsite, so feel free to add it. Let me know how can I help! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to suggest adding this usage example to the doc site. It covers how to add functionality for the user to do group selection using the shiftKey modifier on the item enter and click events. I hope it's a good example of how to use customized event handlers. Also, it shows another integration of the useMultipleSelection hook. Here is the code pen link https://codesandbox.io/s/cold-dawn-vv5w5j
As a side note or question, I wonder if it would make sense to expose the shift modifier key in the reducer for these events or send the event to the reducer as a whole. This would allow the handling of this kind of interaction in the reducer or possibly the onStateChange function. I notice the alt key is being tracked for some of the arrow key presses maybe the shift could be added for the enter and click events. Just a thought I know it's only one use case but it would streamline this implementation and may be useful for others. I could submit a PR for that if you think it would be reasonable.
The text was updated successfully, but these errors were encountered: