From ed27d94b35dc91e5ceee510aab35a0813bf7dc7a Mon Sep 17 00:00:00 2001 From: Maciej Laufer <35459150+maciejlaufer@users.noreply.github.com> Date: Mon, 5 Oct 2020 15:12:43 +0200 Subject: [PATCH] feat: suggestions trigger rule (#1507) --- .../src/MentionSuggestions/MentionSuggestions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-js-mention-plugin/src/MentionSuggestions/MentionSuggestions.js b/draft-js-mention-plugin/src/MentionSuggestions/MentionSuggestions.js index 9d0f6b4c23..8121cb2ca7 100644 --- a/draft-js-mention-plugin/src/MentionSuggestions/MentionSuggestions.js +++ b/draft-js-mention-plugin/src/MentionSuggestions/MentionSuggestions.js @@ -122,7 +122,7 @@ export class MentionSuggestions extends Component { 'g' ).test(plainText) && anchorOffset <= end) || // @ is the first character - (anchorOffset > start + this.props.mentionTrigger.length && + (anchorOffset >= start + this.props.mentionTrigger.length && anchorOffset <= end) // @ is in the text or at the end );