Skip to content

[combobox] More specific event reason when input clearing is caused by item selection #4348

Closed

Description

@literalpie

Feature request

Summary

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.

The relevant code is here

Activity

  1. linear commented on Mar 16, 2026

    @linear
  2. added
    component: comboboxChanges related to the combobox component.
    and removed on Mar 17, 2026
  3. atomiks commented on Mar 17, 2026

    @atomiks
    Contributor

    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.

  4. literalpie commented on Mar 17, 2026

    @literalpie
    Author

    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!

  5. 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
  6. added
    type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.
    on Jul 29, 2026
  7. github-actions commented on Aug 12, 2026

    @github-actions

    This fix will be available in the next npm release of Base UI.

    In the meantime, use the canary build from PR #5362:

    npm i https://pkg.pr.new/@base-ui/react@ec51aaf

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: comboboxChanges related to the combobox component.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions