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

ngbAccordionToggle is not disabled when ngbAccordionItem is disabled #4662

Open
DanielRose opened this issue Jan 22, 2024 · 0 comments
Open

Comments

@DanielRose
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant