ngbAccordionToggle is not disabled when ngbAccordionItem is disabled
DanielRose opened this issue · comments
Bug description:
When an ngbAccordionItem
is disabled, the button should also be disabled. However, this is done inconsistently.
- If the button is a
ngbAccordionButton
, it is disabled. - If the button is a
ngbAccordionToggle
, it is not disabled. Instead, this must be done explicitly. This is a breaking change from the component-based accordion.
In the example, you can see that <button ngbAccordionToggle [disabled]="second.disabled">
is needed to set the button into its disabled state, which is not needed for the <button ngbAccordionButton>
.
If you compare it to "Custom Header" in the old release (https://ng-bootstrap.github.io/releases/13.x/#/components/accordion/examples), no explicit code is needed (<button ngbPanelToggle>
)
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-sda4bv?file=src%2Fapp%2Faccordion-basic.html
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 17.0.9
ng-bootstrap: 16.0.0
Bootstrap: 5.3.2