diff --git a/.changeset/khaki-dryers-kneel.md b/.changeset/khaki-dryers-kneel.md new file mode 100644 index 00000000..a7a741c6 --- /dev/null +++ b/.changeset/khaki-dryers-kneel.md @@ -0,0 +1,5 @@ +--- +"react-mentions": patch +--- + +Fix suggestions not showing while composing diff --git a/src/MentionsInput.js b/src/MentionsInput.js index a69903ef..9efc60aa 100755 --- a/src/MentionsInput.js +++ b/src/MentionsInput.js @@ -564,6 +564,10 @@ class MentionsInput extends React.Component { let mentions = getMentions(newValue, config) + if (ev.nativeEvent.isComposing && selectionStart === selectionEnd) { + this.updateMentionsQueries(this.inputElement.value, selectionStart) + } + // Propagate change // let handleChange = this.getOnChange(this.props) || emptyFunction; let eventMock = { target: { value: newValue } }