Fix emoji autocomplete (#1616)
* Fix emoji autocomplete * Feedback review
This commit is contained in:
parent
ac6e5fda79
commit
252ea21f8c
1 changed files with 2 additions and 2 deletions
|
|
@ -82,9 +82,9 @@ export default class EmojiSuggestion extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.props.emojis !== nextProps.emojis) {
|
||||
if (this.matchTerm.length) {
|
||||
this.handleFuzzySearch(this.matchTerm, nextProps);
|
||||
} else if (!this.matchTerm.length) {
|
||||
} else {
|
||||
const initialEmojis = [...nextProps.emojis];
|
||||
initialEmojis.splice(0, 300);
|
||||
const data = initialEmojis.sort();
|
||||
|
|
|
|||
Loading…
Reference in a new issue