harshq / react-native-mentions

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

Callback is not working; suggestions do not get updated when I type #35

Open thlee1122 opened 6 years ago

thlee1122 commented 6 years ago

Hello,

I am having an issue with the callback function. I have trigger={'#'} so when I type # then it does show me the suggestions. However, suggestions does not get updated with matching suggestions when I continue typing.

Below is the example of what I mean

image

Here is my code for MentionsTextInput: image

Here is my callback function: image

I am actually importing sample hashTag data from local json file through import * as hashTagData from '../data/sampleHashTagData.json';

And in the componentDidMount(), I am setting that data to the state: componentDidMount() { this.setState({ hashTags: hashTagData.results, }); }

Could you anyone please help me solve this issue?

mrazadar commented 5 years ago

Hey just published a new react-native-mentions package. Check it out.

dabakovich commented 3 years ago

You can try a react-native-controlled-mentions that is not rich in configuration yet but enough stable for use in projects. https://www.npmjs.com/package/react-native-controlled-mentions