Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accordion: Incorrect typing of AccordionTab headericon active parameter #5610

Open
hobuttt opened this issue Apr 18, 2024 · 0 comments
Open
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@hobuttt
Copy link

hobuttt commented Apr 18, 2024

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 hobuttt added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 18, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.0.0 milestone Apr 26, 2024
@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

No branches or pull requests

2 participants