|
|
@ -21,10 +21,20 @@ export default class EmojiHelper extends AutocompleteHelper { |
|
|
|
this.container.append(this.list); |
|
|
|
this.container.append(this.list); |
|
|
|
|
|
|
|
|
|
|
|
this.scrollable = new ScrollableX(this.container); |
|
|
|
this.scrollable = new ScrollableX(this.container); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.addEventListener('visible', () => { |
|
|
|
|
|
|
|
setTimeout(() => { // it is not rendered yet
|
|
|
|
|
|
|
|
this.scrollable.container.scrollLeft = 0; |
|
|
|
|
|
|
|
}, 0); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public renderEmojis(emojis: string[]) { |
|
|
|
public renderEmojis(emojis: string[]) { |
|
|
|
if(this.init) { |
|
|
|
if(this.init) { |
|
|
|
|
|
|
|
if(!emojis.length) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.init(); |
|
|
|
this.init(); |
|
|
|
this.init = null; |
|
|
|
this.init = null; |
|
|
|
} |
|
|
|
} |
|
|
@ -36,10 +46,6 @@ export default class EmojiHelper extends AutocompleteHelper { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!this.hidden) { |
|
|
|
|
|
|
|
this.scrollable.container.scrollLeft = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.toggle(!emojis.length); |
|
|
|
this.toggle(!emojis.length); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|