webscopeio / react-textarea-autocomplete

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

Selected item replaces from last space rather than the last trigger #50

Closed ellerynz closed 6 years ago

ellerynz commented 6 years ago

Hi there,

Thanks for putting this together! I was wondering if there is a way to prevent the following behaviour:

screencast 2018-02-19 15-41

Hello :world # Ouputs => Hello :earth_americas:
Hello:world # Outputs => :earth_americas: but expected Hello:earth_americas:

Looks like everything from/including the last space is replaced but I was expect everything from/including the last trigger to be replaced.

This seems related to the resolved issue #43.

jukben commented 6 years ago

👋Hi! This is also reproducible on https://codepen.io/jukben/pen/bYZqvR which is always the last version. It's definitely a bug, sorry about it I will take a look ASAP. 💪 Thanks for reporting!

jukben commented 6 years ago

I have good news @ellerynz. This should be fixed in v1.5.2! Take it while it's hot. 🔥

Please, if you like the package, like it, share it. Your support means a lot to me. Thanks again for creating an issue. 💪

ellerynz commented 6 years ago

@jukben Nice speedy fix! Thanks!

cheers