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] onOpen and onClose emitter won't trigger any events with the new components for accordion #17770

Open
2 of 4 tasks
ruthjohnstonmusic opened this issue Feb 25, 2025 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@ruthjohnstonmusic
Copy link

Describe the bug

The onOpen and onClose emitter for accordion don't work with the new accordion-header and accordion-content components. The events are triggered when you use the old component p-accordionTab or p-accordion-tab. I see this issue has been resolved for v19 but it is also occurring in v18 and I'm not sure if the fix for 19 will be applied to 18 as well.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/github-8n33ys8f?file=src%2Fapp%2Ftest%2Ftest.component.html

Environment

stackblitz

Angular version

18.1.2

PrimeNG version

v18 (LTS Only)

Node version

22.5.1

Browser(s)

No response

Steps to reproduce the behavior

Link the onClose or onOpen Emitter to p-accordion with p-accordion-panel, header, content.
Try to open or close and accordion panel and nothing is triggered.

Expected behavior

Trigger the events for the onClose and onOpen Emitters with the new accordion components.

@ruthjohnstonmusic ruthjohnstonmusic added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 25, 2025
@gregorwinkler
Copy link

gregorwinkler commented Feb 26, 2025

With PrimeNG 19.0.8 the events are triggered but the emitted index is always -1 which is not how it was in older PrimeNG versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants