Skip to content

Commit

Permalink
fix(accordion): prevent error with nested accordions (#1120)
Browse files Browse the repository at this point in the history
This is a backport of 898e1df (#1119) to 15.x.

An instance of the accordion component should only care about its own
panels. Including nested accordions' panels causes an error when trying
to update panels that don't belong the parent instance.

closes #1118
  • Loading branch information
kevinbuhmann authored Jan 8, 2024
1 parent 105fb1f commit f8792bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/angular/src/accordion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { AccordionService } from './providers/accordion.service';
})
export class ClrAccordion implements OnInit, OnChanges, AfterViewInit, OnDestroy {
@Input('clrAccordionMultiPanel') multiPanel: boolean | string = false;
@ContentChildren(ClrAccordionPanel, { descendants: true }) panels: QueryList<ClrAccordionPanel>;
@ContentChildren(ClrAccordionPanel) panels: QueryList<ClrAccordionPanel>;
subscriptions: Subscription[] = [];

constructor(private accordionService: AccordionService) {}
Expand Down

0 comments on commit f8792bb

Please sign in to comment.