Closed Rendez closed 1 year ago
We know about the problem. It's because the current API provides disabled
as a prop to getItemProps
which is called with the menu open. WIP to replace this with a hook prop isItemDisabled
.
Will close this as we are tracking it here https://github.com/downshift-js/downshift/issues/1176. I am working to make this possible in v8, which I plan to release in about a month. Right now I am piling up breaking changes for it.
Let me know if I can assist further.
Makes total sense, also to remove the disabled HTML dom attribute, thanks!
downshift
version: ^7.1.2node
version: 16.10.0npm
(oryarn
) version: 7.24.0Relevant code or config
Same goes for
useCombobox()
withInputKeyDownArrowDown/InputKeyDownArrowUp
.What you did:
Produce a
ToggleButtonKeyDownHome
event with keyboard navigation while the menu is closed and obviously while focused on the toggle button. If the first item or item-to-be-highlighted is disabled, it doesn't skip that item but highlights it. This behavior doesn't happen when the menu is already opened.What happened:
Disabled items get highlighted.
Reproduction repository:
Problem description:
Suggested solution: