add active state to children text links
This commit is contained in:
@@ -14,10 +14,11 @@
|
||||
</template>
|
||||
</h4>
|
||||
|
||||
<b-nav class="ml-auto flex-nowrap">
|
||||
<b-nav class="ml-auto flex-nowrap" pills>
|
||||
<b-nav-item
|
||||
v-for="child in text.children" :key="child.id"
|
||||
@click="$emit('open', id, child.id)"
|
||||
:active="children.includes(child.id)"
|
||||
>
|
||||
{{ child.id }}
|
||||
</b-nav-item>
|
||||
@@ -67,7 +68,8 @@ export default {
|
||||
name: 'TextCard',
|
||||
|
||||
props: {
|
||||
id: { type: Number, required: true }
|
||||
id: { type: Number, required: true },
|
||||
children: { type: Array, default: null }
|
||||
},
|
||||
|
||||
data () {
|
||||
|
||||
Reference in New Issue
Block a user