We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c097696 commit f8075beCopy full SHA for f8075be
src/components/DsfrAccordion/DsfrAccordion.vue
@@ -34,7 +34,14 @@ export default defineComponent({
34
35
methods: {
36
toggleExpanded () {
37
- this.$emit('expand', this.id)
+ /*
38
+ * Close current accordion if expanded
39
+ */
40
+ if (this.expanded) {
41
+ this.$emit('expand', undefined)
42
+ } else {
43
+ this.$emit('expand', this.id)
44
+ }
45
},
46
47
0 commit comments