-
Notifications
You must be signed in to change notification settings - Fork 213
Description
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:
- Customizable
<select>
element whatwg/html#9799 (comment) - Filterable
<select>
via<input>
(native combobox & more) whatwg/html#11288 (comment)
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)