diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index c0391f6c..9a2307cb 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -7,7 +7,7 @@ import { faStickyNote, faSmileBeam } from '@fortawesome/free-solid-svg-icons' -import { trim, escapeRegExp, startCase } from 'lodash' +import { trim, escapeRegExp, startCase, debounce } from 'lodash' library.add( faBoxOpen, @@ -42,6 +42,9 @@ const EmojiPicker = { EmojiGrid }, methods: { + debouncedSearch: debounce(function (e) { + this.keyword = e.target.value + }, 500), onStickerUploaded (e) { this.$emit('sticker-uploaded', e) }, @@ -85,17 +88,6 @@ const EmojiPicker = { activeGroupView () { return this.showingStickers ? '' : this.activeGroup }, - stickersAvailable () { - if (this.$store.state.instance.stickers) { - return this.$store.state.instance.stickers.length > 0 - } - return 0 - }, - filteredEmoji () { - return this.filterByKeyword( - this.$store.state.instance.customEmoji || [] - ) - }, emojis () { const recentEmojis = this.$store.getters.recentEmojis const standardEmojis = this.$store.state.instance.emoji || [] diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index fe2e39b2..5a1088c0 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -44,11 +44,10 @@ >