Skip to content

Combobox rework #2857

@benjaminleonard

Description

@benjaminleonard

Currently a combobox and listbox both look are behave mostly the same but the combobox lets you add arbitrary values. But this treatment makes it unclear whether or not the input does accept arbitrary values and we run into issues by using the text input as the method by which you filter the list since you'd expect whatever is in the input to be the value accepted by the form.

I therefore think we can distinguish the two by having:

  1. Combobox that behaves basically as it does not but that commits the value on blur (rather than requiring click or enter to assign the custom value).
  2. A select that has a separate input to filter the list within the dropdown instead. This way it's clear that it will not be saved when the dropdown is closed, that its distinct from the actual input and its more intuitive which accepts custom input.

Ariakit has a good example of the dropdown input for a new filterable listbox.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions