Open joeyparis opened 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/tbleckert/react-select-search/E624VfFZQWGrJQDNXqZP44oDLzkt
✅ Preview: https://react-select-search-git-fork-joeyparis-default-cb99e3-tbleckert.vercel.app
Currently, if you set the
search
prop to true but do not provide afilterOptions
function then the entire options list is always returned. I added a simple default filter function that checks if thesearch
value is included (case insensitive) anywhere in thename
value of each option.Alternatively, we could log an error/warning if
search
is true butfilterOptions
is null.