You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
I added a custom wrapper component around v-collapse-wrapper and everything works fine except the functionality, that only one item is open. Is there a workaround for this?
The wrapper looks like this:
<v-collapse-group :onlyOneActive="true"><c-collapsev-for="item in collapsible"
:active="item.active"
:key="item.id"
:title="item.title">{{item.content }}</c-collapse></v-collapse-group>
And inside the component:
<template><v-collapse-wrapper :active="active" :class="b({expanded: isExpanded})"><divv-collapse-toggle :class="b('toggle')" @click="setState"><e-icon :class="b('icon')" :inline="true"icon="i-plus"/>{{ title }}</div><divv-collapse-content :class="b('content')"><div :class="b('inner')"><slot></slot></div>
</div></v-collapse-wrapper></template><script>exportdefault{name: 'c-collapse',// components: {},// mixins: [],props: {/** * Sets item to active */active: {type: Boolean,required: false,default: false,},/** * Title of the toggle */title: {type: String,required: true,},},data(){return{isExpanded: false};},// computed: {},// watch: {},// beforeCreate() {},// created() {},beforeMount(){if(this.$props.active)this.isExpanded=true;},// mounted() {},// beforeUpdate() {},// updated() {},// activated() {},// deactivated() {},// beforeDestroy() {},// destroyed() {},methods: {/** * Sets and emits the current state */setState(){this.isExpanded=!this.isExpanded;// toggle statethis.$emit('toggle-state',this.isExpanded);// listens to @toggle-state}},// render() {},};</script>
The text was updated successfully, but these errors were encountered:
silvbaumann
changed the title
Custom toggle component breaks functionality
Custom wrapper component breaks functionality
May 3, 2018
I added a custom wrapper component around
v-collapse-wrapper
and everything works fine except the functionality, that only one item is open. Is there a workaround for this?The wrapper looks like this:
And inside the component:
The text was updated successfully, but these errors were encountered: