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 b367528 commit b43ee97Copy full SHA for b43ee97
packages/kit-headless/src/components/accordion/accordion-item.tsx
@@ -77,6 +77,12 @@ export const HAccordionItem = component$(
77
78
// collect trigger refs for keyboard navigation
79
context.triggerRefsArray.value[localIndexSig.value] = triggerRef;
80
+
81
+ // update selected index when new are added and the item is opened
82
+ track(() => isOpenSig.value);
83
+ if (isOpenSig.value) {
84
+ context.selectedIndexSig.value = localIndexSig.value;
85
+ }
86
});
87
88
useTask$(() => {
0 commit comments