top | item 30455692

(no title)

saint-loup | 4 years ago

Recent discovery: there's a native <datalist> element, well supported except for Firefox@Android. It's a combo of <select> and filtering (a combo box, to use the Windows parlance).

https://developer.mozilla.org/fr/docs/Web/HTML/Element/datal...

discuss

order

theandrewbailey|4 years ago

The big downside is that datalist will only show exact matches of what you've put in. If you're doing a fuzzy search somewhere (or the user has a typo) and want to offer search suggestions, a native datalist doesn't work. I wish there was an attribute that forced all options to appear when filtering happens elsewhere and options are dynamic.