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] Native way to prevent clearing of input after selection #3977
I think the Combobox should have a native way to prevent resetting of inputValue after selection of an item.
The prop could be called - clearInputAfterSelection.
Maybe another prop called - closePopupAfterSelection to prevent closing the popup when the input is not in popup.
Motivation
This would be useful in lists where you want to select multiple options with the similar search query, but I have seen this in other comboboxes as well. Example from Github label selector.
Screen.Recording.2026-02-05.at.1.05.16.PM.mov
This is how I would do it right now, but I feel this would be fragile, and may cause issues as the library evolves -
@mj12albert That works for when you have popups, but the query will still be reset for inline comboboxes. Therefore I think we should have a native way to do this (for both inline and non-inline comboboxes). Not resetting the query after selection is a valid use case for quite a few comboboxes. These custom checks would be difficult to maintain as the component internal reasons, etc can change through various minor versions of the library.
This installs a complete package for @base-ui/react with the feature included. It is hosted by pkg.pr.new rather than npm, and the URL is available for up to six months.
Activity
mj12albert commentedon Feb 9, 2026
@sarthakmalik0810 This seems quite similar to #3181
Is this what you're trying to achieve? https://stackblitz.com/edit/bcocshwo-kkp2dff4?file=src%2FApp.tsx
sarthakmalik0810 commentedon Feb 9, 2026
@mj12albert That works for when you have popups, but the query will still be reset for
inlinecomboboxes. Therefore I think we should have a native way to do this (for bothinlineandnon-inlinecomboboxes). Not resetting the query after selection is a valid use case for quite a few comboboxes. These custom checks would be difficult to maintain as the component internal reasons, etc can change through various minor versions of the library.docs(combobox): note base-ui workaround and upstream tracking issues
github-actions commentedon Aug 12, 2026
This feature 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 feature included. It is hosted by pkg.pr.new rather than npm, and the URL is available for up to six months.