harshq / react-native-mentions

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

Displaying human names in place of @mention? #28

Open tmaly1980 opened 6 years ago

tmaly1980 commented 6 years ago

I'm hoping to duplicate the exact user experience with facebook's mobile app....

I was wondering if it's possible to display a human name "John Davis" rather than just "@johndavis3", based on the item selected? And then when pressing backspace, that it clear the full name (or last name) all at once, rather than one letter at a time?

I noticed there was info on how to add background coloring (https://github.com/harshq/react-native-mentions/issues/7), but that shows the formatted text absolutely positioning on top of the textinput, which has transparent text... This would work except the only issue is if we're using a human name instead of the encoded @name, it's likely not the same length so the cursor is going to be in the wrong place. The human name could be longer than the @name (which could be padded), but it could also be shorter (which can't really be padded).

Any suggestions?

singhaishwarya commented 5 years ago

any update?

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