3 ms·
React-Searchable-Dropdown
- luciodale 1y agoI really didn’t want to build this, but I just couldn’t find a dropdown that handled everything I needed. It started as a project requirement and slowly grew into something that now covers single and multi selection, creating new options if needed (but only if you want), virtualization (no opt out) for big lists, full keyboard support, search with highlighting, and easy styling with plain CSS (no frameworks), no themes to fight against. I think this gets close to what most people actually need from a dropdown without making you glue together a bunch of separate pieces. Hopefully it saves someone else the time I spent chasing edge cases. Feedback is very much welcome.
- jonasdoesthings 1y agoI've seen that there's a demo, but the link is kinda small and you need to scroll down on the Website. Adding a small gif to the README showcasing one or more implementations of the component would be cool
- Oxodao 1y agoIs it possible to use it as an autocomplete (call an API to filter the search) ? I nearly lost my mind last week-end trying to find a good one that was accessible and that didn't required a whole framework to be imported
- luciodale 1y agoAh. I'd have to expose `onSearchChange`. I can get it done before EOD :).. will ping you here when I've put an example on the website.
- Oxodao 1y agoThanks!
- luciodale 1y agoThere's an example up :) ... https://github.com/luciodale/react-searchable-dropdown/blob/main/dev/src/components/ServerOptionsDropdownDemo.tsx https://github.com/luciodale/react-searchable-dropdown/blob/... It turned out to be quite simple as I expected.. you can check the demo on the site too