update some documentation
This commit is contained in:
parent
1cd222d85c
commit
419df9d446
2 changed files with 8 additions and 12 deletions
|
@ -175,13 +175,13 @@ const EmojiInput = {
|
|||
showSuggestions: function (newValue) {
|
||||
this.$emit('shown', newValue)
|
||||
},
|
||||
textAtCaret: async function (textAtCaret) {
|
||||
const firstchar = textAtCaret.charAt(0)
|
||||
textAtCaret: async function (newWord) {
|
||||
const firstchar = newWord.charAt(0)
|
||||
this.suggestions = []
|
||||
if (textAtCaret === firstchar) return
|
||||
const matchedSuggestions = await this.suggest(textAtCaret)
|
||||
// Async, cancel if textAtCaret has been updated while waiting
|
||||
if (this.textAtCaret !== textAtCaret) return
|
||||
if (newWord === firstchar) return
|
||||
const matchedSuggestions = await this.suggest(newWord)
|
||||
// Async: cancel if textAtCaret has changed during wait
|
||||
if (this.textAtCaret !== newWord) return
|
||||
if (matchedSuggestions.length <= 0) return
|
||||
this.suggestions = take(matchedSuggestions, 5)
|
||||
.map(({ imageUrl, ...rest }) => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue