Skip to content

Commit

Permalink
fix: suggestions not showing while composing (#683)
Browse files Browse the repository at this point in the history
* fix: suggestions not showing while composing

* Add changeset

---------

Co-authored-by: khsily <khsily@mailplug.co.kr>
  • Loading branch information
khsily and khsily authored Jun 29, 2023
1 parent c9fd8ca commit 32d9728
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-dryers-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-mentions": patch
---

Fix suggestions not showing while composing
4 changes: 4 additions & 0 deletions src/MentionsInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }
Expand Down

1 comment on commit 32d9728

@vercel
Copy link

@vercel vercel bot commented on 32d9728 Jun 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-mentions – ./

react-mentions-git-master-signavio.vercel.app
react-mentions-signavio.vercel.app
react-mentions.vercel.app

Please sign in to comment.