[Mentions Plugin] No results showing and onSearchChange not triggering
See original GitHub issueHi,
I was able to get this working before but for some reason after doing some slight changes to our custom editor, the mentions menu never shows up now and our onSearchChange
method never gets called.
I did some debugging and getAllSearches
seem to always return Map {size: 0, ...}
so it never calls onSearchChange
in MentionSuggestions
in the onEditorStateChange
method.
It’s been pretty difficult trying to debug what the issue might be. We are bringing in a full tags list, setting it initially as this.state.suggestions
and then passing it in, but we just don’t get any results and onSearchChange
never fires. We don’t see any errors either so it’s just been hard figuring out what we could be doing incorrectly.
Any thoughts on what could be wrong with our setup or why we can’t seem to get any results?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top GitHub Comments
I will describe my issue and how I fixed it,
Scenario: 1- A Rich Text Editor (RTE) a user can write what he wants and can mention any user at the system. 2- User click on submit button. 3- System reset RTE after submitting How System reset, by the following line
EditorState.createEmpty()
4- Mention plugin not working again anymore and onSearchChange not triggering again.For more than 3 hours investigating, the above line of code reset the editor and also remove any attached plugin. So I change it to the following line of code and everything working fine.
EditorState.push(currentState, ContentState.createFromText(''))
I merged yesterday which might fixes the issue. Please let me know if it did after the next release …