-
Notifications
You must be signed in to change notification settings - Fork 561
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
[Combobox] Respect openOnFocus property, and prevent popover close on input clear #709
Comments
Playing around with it more, I could see the value in wanting the popover to remain open when the input is cleared to show some results. The current workaround is to use the I created a branch that keeps the popover visible even when the input is cleared when I can't decide if it's a good solution to change the behavior of If this feature is something we'd like to support, perhaps it being a separate prop (e.g. @chaance I'd be curious to hear your thoughts on what to do here. |
Any updates on this ? |
I'm also interested in this enhancement, this would be a good UX feature 🙌 |
No progress here as I haven't had time to think about features. With what little time I do have to work on Reach, I've got a few bugs I'm trying to knock out first. That said, I'm interested in this one and would like to explore it a bit when I can. |
In my opinion, this (close on clear) is hardly a feature request, but rather unexpected behavior and a bug. Checking a few other similar plugins (react-select.com, select2.org, mui.com/material-ui/react-autocomplete, semantic-ui.com/modules/dropdown.html), they all stay open when field/value is cleared. |
🚀 Feature request
Current Behavior
As per #655, currently when the combobox input is cleared (i.e. the value changes to an empty string) the combobox popover is closed.
This happens even when the
openOnFocus
prop is set to true. This leads to a strange interaction where,ComboboxPopover
opensIf you then focus on another element, then back to the input, the popover reopens - though again, nothing has changed in the input.
Desired Behavior
While the input is focused, the
ComboboxPopover
should always remain open, and should only close when focus is lost.Suggested Solution
Either make the
openOnFocus
prop override the automatic close/hide functionality of theComboboxPopover
, or if that isn't the intended behaviour, add a new prop such askeepOpenOnClear
(which defaults to false) that can be used in conjunction withopenOnFocus
to prevent unwanted closing of the popover.Who does this impact? Who is this for?
For developers who want all of the options displayed when there is the input is empty - which allows users to quickly select an option without necessarily needing to type. This functionality is already there when the Combobox is first focused, but is lost when the input is subsequently cleared.
Describe alternatives you've considered
As mentioned in #655, the workaround described in #367 (comment) is unsatisfactory from a UX perspective.
Additional context
This was already requested in #367 and #655, but the issue was closed due to inactivity.
The text was updated successfully, but these errors were encountered: