Replies: 1 comment 1 reply
-
I don't think we considered a use case like this when we made the hook, I am a bit concerned that it may clash with the typeahead support that is built in though, especially since the typeahead keydown handler is a capturing one. The only way to add that custom onKeyDown for now is to dropdown to the hook level implementation I think where you could then add the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, wondering how we should handle key down events on GridLists item, if we pass onKeyDown to an Item it will not be called as it filtered with filterDOMProps https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/GridList.tsx#L329
My use case is pretty simple, having a list user can grade each item by pressing a key from 1-6,
https://codesandbox.io/s/winter-breeze-cyvlnz?file=/src/App.js:0-648
What is best approach here? Even if i register key down even on window in child of Item, then it's hard to filter out current as the target will be from Item where focus is.
Beta Was this translation helpful? Give feedback.
All reactions