[React][Combobox] Keep the selected option active #1474
Unanswered
JesusTheHun
asked this question in
Help
Replies: 0 comments
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.
-
Following #1178 but with a different use case.
Check this : https://stackblitz.com/edit/react-dw9luu?file=src/App.js
Open the console.
Using the keyboard, select a person in the list. Now press
Cmd/Ctrl + ArrowLeft.The person is programmatically set to
Kenton Towne.The input still has the focus, but the selected value is not
active, which means if I pressEnterit won't trigger a value change.My use case is a multi-step combobox when you are prompted for more choices one after another. When you go back (because you think missclicked for example) you should be able to just press enter again to validate your value.
I think one of the solution to this problem would be to have an optional
alwaysActiveprop onOptionsThis would not break the logic since currently, if you select a value, and then press
ArrowDownit will activate the selected option.Beta Was this translation helpful? Give feedback.
All reactions