webscopeio / react-textarea-autocomplete

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

Multi character trigger? #91

Closed O4epegb closed 6 years ago

O4epegb commented 6 years ago

I see that it is not possible to use this library with multi character trigger. Could it be implemented in the future or is it out of scope?

I am already using it for mentions, but current use case is commands, for example, first you type / and get list of commands, then after selecting one, for example /kick you get list with all chat members.

jukben commented 6 years ago

Interesting idea and good example use case, I'll think about it. 👍

jukben commented 6 years ago

Hey, just to let you know I started to work on this and it seems it should be relatively easy. I have to check for potential corner cases, but eventually, it would be able possible. I'll keep this thread up to date. 💪

O4epegb commented 6 years ago

Oh, that's actually very nice, thank you!

jukben commented 6 years ago

Hey, @O4epegb I've just deployed new version 3.1.1 which should solve your issue. 🚀

Check out this: https://codepen.io/jukben/pen/aQmLZG (type / to start)

What do you say about it?

O4epegb commented 6 years ago

Seems awesome, exactly what I needed! Thank you very much!