webscopeio / react-textarea-autocomplete

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

Fix correct event propagation #114

Closed jukben closed 5 years ago

jukben commented 5 years ago

close #112

Breaking change 💣 I've completely removed closeOnClickOutside prop because it can't be combined together with the new behavior of events. Also, I think it should be like that as default.

What it does

If you do something like this

<ReactTextareaAutocomplete
    onKeyDown={e => {
        console.log(`pressed "${e.key}"`);
    }}
    ...
/>

the onKeyDown now ignores every event happening in the context of autocomplete. Open the playground, play with it and check the console. 👍

jukben commented 5 years ago

(bot)

Hey! Thank you so much for your PR! I can see that everything is green 👏.

Here is the playground for this revision 🚀

I hope everything is fine! ❤️