ng-bootstrap / ng-bootstrap

Angular powered Bootstrap

Home Page:https://ng-bootstrap.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accordion - unable to cancel an event

dkaczor97 opened this issue · comments

Bug description:

Hi! I have upgraded from v13 to v16. I've noticed a big breaking change in Accordion's behaviour.
I've had a few panels where there were forms. I was checking if the form is dirty before a panel was collapsed. I was able to do it with panelChange event and preventDefault function in it's payload.
Now I can only subscribe to hide event which gives me only id of panel being collapsed. I have no option to cancel the event.

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/angular-nfcfc3?file=src%2Fapp%2Faccordion-basic.ts

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 17
ng-bootstrap: 16