Skip to content

Some thoughts and questions about combobox #1273

@josepharhar

Description

@josepharhar

I have some thoughts about how to move forward with combobox and some questions about the explainer: https://open-ui.org/components/combobox.explainer/

New element

Due to feedback from Apple, I don't think that we should try to make a new <combobox> element:

Instead, I think that we could try to just reuse <input type=text list=datalist> and put base appearance on it (and its datalist), like we did with customizable select.

filter attribute

Without the proposed filter attribute, are all the options in the datalist supposed to be rendered all the time? Why not just always let filtering happen without the need for another attribute?

button and selectedcontent elements

The explainer has an example that has a button and selectedcontent element:

<combobox>
  <input type="text"/>
  <button><selectedoption></selectedoption></button>
  <datalist>
    ...

I'm guessing that this is supposed to clone the DOM contents of the currently selected option into something inside the text input, in addition to the text that the user is actually typing? I think that the select element with some filtering upgrades could work better for this.

filtering for select elements

This HTML issue made me think more about how we could try to add a text filter to the select element in some way, which I think would accomplish a lot of use cases related to the combobox proposal. I posted more about that here: #847 (comment)

I think there could be some overlap with the proposed search attribute and how we could make filtering work for select elements like @lukewarlow mentioned here: #847 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions