Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> A full country list inside a native `<select>` has several structural limitations:

> No filtering. Users cannot narrow the list by typing

But you can use an `<input type="text">` instead and add a `<datalist>`[0] to it with the list of countries and you will be able to filter them by typing. Granted, it still has no full support (namely, firefox), but still that's much better than a `<select>` with no filtering ability whatsoever.

Not sure why this is not more known, though, I've seen it just like a couple of times in the wild. Now, back to job searching...

[0] https://developer.mozilla.org/es/docs/Web/HTML/Reference/Ele...




At least in Firefox and Chrome on MacOS, you can search <select> dropdown menus by typing.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: