mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-24 18:00:40 +00:00
fix loading EmojiList from server just one time
This commit is contained in:
@@ -151,17 +151,23 @@ export default {
|
||||
}, 800),
|
||||
openMenu() {
|
||||
|
||||
this.loadedList = false
|
||||
|
||||
this.selectOpen = !this.selectOpen
|
||||
|
||||
//Load emojis
|
||||
if (this.selectOpen) {
|
||||
// Load emojis from server just if not loaded already
|
||||
if (this.selectOpen && ! this.emojis) {
|
||||
this.$store.dispatch('getEmojisList').then((loaded) => {
|
||||
this.loadedList = loaded
|
||||
})
|
||||
}
|
||||
|
||||
if ( ! this.selectOpen )
|
||||
this.loadedList = false
|
||||
// Simulate loading for the emojisList processing
|
||||
if(this.emojis) {
|
||||
setTimeout(() => {
|
||||
this.loadedList = true
|
||||
}, 20);
|
||||
}
|
||||
|
||||
this.searchInput = ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user