-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix clear input on blur when no match #695
base: dev
Are you sure you want to change the base?
Conversation
Signed-off-by: Achraf Mohyeddine <[email protected]>
Sounds like a good idea to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested in osrd ✅
@@ -198,8 +198,7 @@ const ComboBox = <T,>({ | |||
} else if (!isInputInSuggestions && selectedOption) { | |||
setInputValue(getSuggestionLabel(selectedOption)); | |||
} else if (!isInputInSuggestions) { | |||
setInputValue(''); | |||
setSelectedOption(null); | |||
clearInput(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearInput()
will focusInput()
at the end. This is confusing for users: they've navigated away from the input (either by clicking outside, or with Tab
, or something else), but then focus is set back to the input.
The commit name has the "front: " prefix, but it should be "ui-core: ". Also it would be nice to mention that this is about the ComboBox component. |
No description provided.