Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Nov 9, 2023
2 parents a4a1f8d + c5d49d9 commit a5a0ce7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/lib/accordion/Accordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@keydown="onTabKeyDown($event, tab, i)"
v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', i) }"
>
<component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :index="i"></component>
<component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :active="isTabActive(i)" :index="i"></component>
<component
v-else-if="isTabActive(i)"
:is="$slots.collapseicon ? $slots.collapseicon : collapseIcon ? 'span' : 'ChevronDownIcon'"
Expand Down
6 changes: 6 additions & 0 deletions components/lib/accordiontab/AccordionTab.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,14 @@ export interface AccordionTabSlots {
/**
* Whether the tab is active
* @param {number} index - Index of the tab
* @deprecated since v3.40.0. Use 'active' property instead.
*/
isTabActive: (index: number) => void;
/**
* Whether the tab is active
* @param {number} index - Index of the tab
*/
active: (index: number) => void;
}): VNode[];
}

Expand Down
2 changes: 1 addition & 1 deletion doc/common/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
{
"name": "scope",
"optional": false,
"type": "{\n \t <span class=\"ml-3 text-primary-700\">index</span>: <span class=\"text-primary-500\">number</span>, <span class=\"text-primary-300\">// Index of the tab</span>\n \t <span class=\"ml-3 text-primary-700\">isTabActive</span>: <span class=\"text-primary-500\">(<span class=\"text-primary-700\">index</span>: number) &rArr; void</span>, <span class=\"text-primary-300\">// Whether the tab is active</span>\n}",
"type": "{\n \t <span class=\"ml-3 text-primary-700\">index</span>: <span class=\"text-primary-500\">number</span>, <span class=\"text-primary-300\">// Index of the tab</span>\n \t <span class=\"ml-3 text-primary-700 line-through\">isTabActive</span>: <span class=\"text-primary-500 line-through\">(<span class=\"text-primary-700\">index</span>: number) &rArr; void</span>, <span class=\"text-primary-300 line-through\">// Whether the tab is active</span>\n\t <span class=\"ml-3 text-primary-700\">active</span>: <span class=\"text-primary-500\">(<span class=\"text-primary-700\">index</span>: number) &rArr; void</span>, <span class=\"text-primary-300\">// Whether the tab is active</span>\n}",
"description": "header slot's params."
}
],
Expand Down

0 comments on commit a5a0ce7

Please sign in to comment.