You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[combobox] More specific event reason when input clearing is caused by item selection #4348
We have a combobox that supports multiple selection with the input inside the popover. We would like to prevent the input value from getting cleared when an item is selected.
It doesn't seem like this can be easily done using details.reason because the reason value is input-clear, which is the same reason given when the clear button is pressed, or other events that we don't want to ignore.
Examples in other libraries
I'm not sure if other libraries support this or not. I didn't look.
Motivation
When allowing multiple selection, I would like my users to be able to filter once, and select multiple items based on that filter.
This is similar to #3977 . The key difference is that the input is inside the popover.
We can't change the existing reasons unless it's a bug emitting an incorrect reason at this stage, as it's a breaking change. Usually though, you can inspect event.type along with the reason to narrow down the reason further, e.g. keyboard event with a specific key or click event.
However, I think this should just be a prop. In the screen recording of the linked issue, the input is also inside the popup and likely it can apply to both patterns at the same time.
changed the title [-][Combobox] More specific event reason when input clearing is caused by item selection[/-][+][combobox] More specific event reason when input clearing is caused by item selection[/+]on Mar 20, 2026
This installs a complete package for @base-ui/react with the fix included. It is hosted by pkg.pr.new rather than npm, and the URL is available for up to six months.
Activity
linear commentedon Mar 16, 2026
BAS-472
atomiks commentedon Mar 17, 2026
We can't change the existing reasons unless it's a bug emitting an incorrect reason at this stage, as it's a breaking change. Usually though, you can inspect
event.typealong with the reason to narrow down the reason further, e.g. keyboard event with a specific key or click event.However, I think this should just be a prop. In the screen recording of the linked issue, the input is also inside the popup and likely it can apply to both patterns at the same time.
literalpie commentedon Mar 17, 2026
Yes if you're suggesting a prop that prevents the input value from being reset on each selection, that would give me what I need!
[-][Combobox] More specific event reason when input clearing is caused by item selection[/-][+][combobox] More specific event reason when input clearing is caused by item selection[/+]github-actions commentedon Aug 12, 2026
This fix will be available in the next npm release of Base UI.
In the meantime, use the canary build from PR #5362:
This installs a complete package for
@base-ui/reactwith the fix included. It is hosted by pkg.pr.new rather than npm, and the URL is available for up to six months.