webscopeio / react-textarea-autocomplete

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

Show popup only if trigger is after a whitespace (like Github) #63

Closed LouisCuvelier closed 6 years ago

LouisCuvelier commented 6 years ago

Hi,

Thanks for this library. It saves me a lot of work 😄

But, I have a problem. Is it possible to show popup only if trigger is after a whitespace ? Basically, I want to prevent popup fired when I'm typing something like

hello:smile

Instead, I only want to fire popup when there is a space before the trigger, like this:

hello :smile

Github works like that.

Thanks in advance for your help 😉

jukben commented 6 years ago

Hi

I can implement this, but I have to figure out how to configure this. I'd like to keep the components modular and few already existing project relying on the current behavior.

Any idea?

LouisCuvelier commented 6 years ago

Maybe a boolean to activate or not the space before ?

jukben commented 6 years ago

Yeah, I'm going to introduce such an option for this case. 👍

jukben commented 6 years ago

Hey! @LouisCuvelier you can try to install the version from the master. The deploy will be soon. (this week I hope). Hope you like it!

LouisCuvelier commented 6 years ago

Just perfect ! Thanks 😄