top | item 46407953

(no title)

dpedu | 2 months ago

I didn't know about <datalist>, but how are you supposed to use it with a non-trivial amount of items in the list? I don't see how this can be a replacement for javascript/XHR based autocomplete.

discuss

order

lelandfe|2 months ago

Don't use it, it totally blows. For another oddity to not use, check out the multiple select: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

Expecting users to press modifiers when clicking on these is so funny.

Hendrikto|2 months ago

> Expecting users to press modifiers when clicking on these is so funny.

I mean… 5 year olds can figure out shift-click in Minecraft.

JodieBenitez|2 months ago

> I don't see how this can be a replacement for javascript/XHR based autocomplete.

It can't do complex autocomplete. It's ok for simple cases only. I use it with a 25k long list to ease the input. Works well enough for this.

reed1234|2 months ago

> If we can hand-off any JS functionality to native HTML or CSS, then users can download less stuff, and the remaining JS can pay attention to more important tasks that HTML and CSS can't handle (yet).

psnehanshu|2 months ago

You can't. It's only supposed to be used for a limited list.

Kwpolska|2 months ago

And even if you allow XHR and add options to a <datalist>, it still has terrible UX.