harshq / react-native-mentions

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

Multiple Trigger characters #12

Open njt1982 opened 7 years ago

njt1982 commented 7 years ago

Can we allow multiple triggers?

For our use case, we use @ to target users and # to target channels. Different autocomplete values... As trigger is a string, it cannot do this at the moment.

It looks like identifyKeyword would be compatible with that string being a regex pattern (eg [@#] or (@|#)) but onChangeText does a literal last character comparison...

What do you think?

Ethaan commented 7 years ago

Did you get something on this?

MartinCamen commented 6 years ago

You can just split the trigger string to an array, and go from there. If I get the time I can create a PR for this, if no one else beats me to it.

theohdv commented 6 years ago

Hello, is someone working on this feature?

Because if not I'm OK to do it.

njt1982 commented 6 years ago

@theohdv I've not done anything... Would be a useful feature!

ericjoy94 commented 5 years ago

Is the feature added in react-native-mentions to allow multiple triggers. for example on '@' or '#' ??