harshq / react-native-mentions

Mentions textbox for React Native. Works on both ios and android. :whale:
MIT License
309 stars 82 forks source link

Predictive text interferes with suggestions #15

Open njt1982 opened 7 years ago

njt1982 commented 7 years ago

So I type @m and get this...

image

If I select the user martin, this happens: image

njt1982 commented 7 years ago

I have worked around this by setting a state to toggle the autoCorrect prop on the TextInput child component.

When a suggestion callback is triggered, it disables the autocorrect state. In my renderSuggestionsRow, when an item is pressed, before executing the stopTracking callback, I reset the state to TRUE.

This mostly works, however if the suggestions are cancelled/stopped outside of pressing a button, then autoCorrect is never re-enabled.