webscopeio / react-textarea-autocomplete

📝 React component implements configurable GitHub's like textarea autocomplete.
MIT License
454 stars 80 forks source link

Enable search on autocomplete #46

Closed kn4rfy closed 6 years ago

kn4rfy commented 6 years ago

Enable searching on the autocomplete

Ex. you type ':pa' the choices are {'package', 'page'} then you type ':pac' the choice results is {'package'}

jukben commented 6 years ago

Thanks for the issue @kn4rfy. 👋 Anyway, I hope, this is out of the scope of this library. This should be done in dataProvider function, where you can define whatever behavior you want. See the example for the similar use case. http://react-textarea-autocomplete.surge.sh/

https://github.com/webscopeio/react-textarea-autocomplete#appjs

For sorter implementation you can use great https://github.com/kentcdodds/match-sorter 💪