From acf90129792ead386f6b4460b7c0a2623df26377 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Wed, 24 Jun 2020 21:41:27 +0300 Subject: [PATCH] Collapse inner items when parent item was closed --- src/views/emojiPacks/components/LocalEmojiPack.vue | 3 +++ src/views/emojiPacks/index.vue | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/emojiPacks/components/LocalEmojiPack.vue b/src/views/emojiPacks/components/LocalEmojiPack.vue index 3da48712..6991a548 100644 --- a/src/views/emojiPacks/components/LocalEmojiPack.vue +++ b/src/views/emojiPacks/components/LocalEmojiPack.vue @@ -188,6 +188,9 @@ export default { } }, methods: { + collapse() { + this.showPackContent = [] + }, deletePack() { this.$confirm('This will delete the pack, are you sure?', 'Warning', { confirmButtonText: 'Yes, delete the pack', diff --git a/src/views/emojiPacks/index.vue b/src/views/emojiPacks/index.vue index 1475ad4f..0dd0eedc 100644 --- a/src/views/emojiPacks/index.vue +++ b/src/views/emojiPacks/index.vue @@ -33,7 +33,7 @@ - + @@ -185,6 +185,7 @@ export default { }) }, setActiveTab(activeTab) { + this.$refs.localEmojiPack.forEach(el => el.collapse()) this.$store.dispatch('SetActiveTab', activeTab) } }