custom-select
custom-select copied to clipboard
Filter should match <datalist> behavior
Rather than just filtering for startsWith, this component should probably match <datalist>'s "contains" filtering behavior (type "fox" in the input field in the example).
Good idea - will do some usability testing to see what non-tech-savvy folks expect and update as needed.
I noticed this missing too, although it has potential to bring with it a lot of complexity:
- When the match is not as obvious (as the first letters) the usual strategy to clarify the match by emphasising (e.g. bolding) the matched value in the text of the displayed options.
- Another additional complication contains may bring is the need to reorder the options, e.g. it may make sense to rank full word matches higher than partial.
It would be valuable in assessing these usability and feature questions to detail some specific use cases where custom-select is particularly useful.