diff options
author | Ivan Chen <ivan@tagg.id> | 2021-05-04 17:18:54 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-05-04 20:48:08 -0400 |
commit | de9f7b13babb5f9656da797c863064578a3a49c3 (patch) | |
tree | ada8bf0313ce7d133f8c70228e3bd5b38271ed73 /src/components/comments/AddComment.tsx | |
parent | 9795083f41e6417c32d9c070ab0b2bf4aca67012 (diff) |
fixed multiple mentions getting populated
Diffstat (limited to 'src/components/comments/AddComment.tsx')
-rw-r--r-- | src/components/comments/AddComment.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/comments/AddComment.tsx b/src/components/comments/AddComment.tsx index f9c5669b..cce846e5 100644 --- a/src/components/comments/AddComment.tsx +++ b/src/components/comments/AddComment.tsx @@ -116,7 +116,12 @@ const AddComment: React.FC<AddCommentProps> = ({ containerStyle={styles.text} placeholder={placeholderText} value={inReplyToMention + comment} - onChange={setComment} + onChange={(newText: string) => { + // skipping the `inReplyToMention` text + setComment( + newText.substring(inReplyToMention.length, newText.length), + ); + }} inputRef={ref} partTypes={mentionPartTypes} /> |