Fixed #4783 - AccordionTab: isTabActive property is deprecated

pull/4789/head
tugcekucukoglu 2023-11-09 13:33:08 +03:00
parent 4fdbe365ba
commit d62493b08b
2 changed files with 7 additions and 1 deletions

View File

@ -20,7 +20,7 @@
@keydown="onTabKeyDown($event, tab, i)" @keydown="onTabKeyDown($event, tab, i)"
v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', 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 <component
v-else-if="isTabActive(i)" v-else-if="isTabActive(i)"
:is="$slots.collapseicon ? $slots.collapseicon : collapseIcon ? 'span' : 'ChevronDownIcon'" :is="$slots.collapseicon ? $slots.collapseicon : collapseIcon ? 'span' : 'ChevronDownIcon'"

View File

@ -194,8 +194,14 @@ export interface AccordionTabSlots {
/** /**
* Whether the tab is active * Whether the tab is active
* @param {number} index - Index of the tab * @param {number} index - Index of the tab
* @deprecated since v3.40.0. Use 'active' property instead.
*/ */
isTabActive: (index: number) => void; isTabActive: (index: number) => void;
/**
* Whether the tab is active
* @param {number} index - Index of the tab
*/
active: (index: number) => void;
}): VNode[]; }): VNode[];
} }