primevue icon indicating copy to clipboard operation
primevue copied to clipboard

Accordion: Incorrect typing of AccordionTab headericon active parameter

Open hobuttt opened this issue 10 months ago • 0 comments

Describe the bug

In the component Accordion.vue, in headericon the active parameter returns a boolean value, but typed(AccordionTab.d.ts) in interface AccordionTabSlots.headericon as if it were returning a function. This causes a typing error.

<component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :active="isTabActive(i)" :index="i"></component>
isTabActive(index) {
            return this.multiple ? this.d_activeIndex && this.d_activeIndex.includes(index) : this.d_activeIndex === index;
}
active: (index: number) => void;

Reproducer

https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template-i6vn59?file=src%2FApp.vue

PrimeVue version

4.0.0-beta.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

hobuttt avatar Apr 18 '24 06:04 hobuttt