4 ms·
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
by dpedu 9mo 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.
- reed1234 9mo 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 9mo agoYou can't. It's only supposed to be used for a limited list.
- lelandfe 9mo agoDon'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/Elements/select#result_3 https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/... Expecting users to press modifiers when clicking on these is so funny.
- Hendrikto 9mo 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.
- lelandfe 9mo agoTrying to figure things out in a game is fun! Trying to figure things out on a website is a sign the UI sucks.
- cardamomo 9mo agoLearn it in a game, then use it on a website. It's a UI convention, not merely a quirk to a multi-select list.
- lelandfe 9mo agoModifier keys are used elsewhere optionally on operating systems. But no other form control demands knowledge of modifier clicks. It's simply a useless bit of UI and should not be used.
- Kwpolska 9mo agoAnd even if you allow XHR and add options to a <datalist>, it still has terrible UX.
- JodieBenitez 9mo 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.