diff --git a/src/components/text/TextCard.vue b/src/components/text/TextCard.vue index 1ec0a0a..dd3bc94 100644 --- a/src/components/text/TextCard.vue +++ b/src/components/text/TextCard.vue @@ -5,7 +5,7 @@ - + @@ -54,6 +54,18 @@ export default { props: { children: { type: Array, default: null } + }, + + methods: { + onChildOpen (_, id, childId) { + this.$emit('open', id, childId) + }, + + onSelfClose (e, id) { + // stop the click event propagation to avoid other listeners to interact with a soon to be deleted element. + e.stopPropagation() + this.$emit('close', id) + } } }