From bb9ab2e9c7c164e6e333bfb4a05a3c606ef9a7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Wed, 28 Feb 2024 13:06:01 +0100 Subject: [PATCH] Accordion watches for activeItemKey changes --- packages/coreui-vue/src/components/accordion/CAccordion.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/coreui-vue/src/components/accordion/CAccordion.ts b/packages/coreui-vue/src/components/accordion/CAccordion.ts index 1422d40b..eee9a535 100644 --- a/packages/coreui-vue/src/components/accordion/CAccordion.ts +++ b/packages/coreui-vue/src/components/accordion/CAccordion.ts @@ -1,4 +1,4 @@ -import { defineComponent, h, provide, ref } from 'vue' +import { defineComponent, h, provide, ref, watch } from 'vue' const CAccordion = defineComponent({ name: 'CAccordion', @@ -21,6 +21,9 @@ const CAccordion = defineComponent({ const setActiveItemKey = (key: string | number) => { activeItemKey.value = key } + + watch(() => props.activeItemKey, value => activeItemKey.value = value) + provide('activeItemKey', activeItemKey) provide('alwaysOpen', props.alwaysOpen) provide('setActiveItemKey', setActiveItemKey) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy