Skip to content

Commit

Permalink
fix(accordion): prevent error with nested accordions
Browse files Browse the repository at this point in the history
This is a port of 898e1df (#1119)
to 17.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 committed Jan 8, 2024
1 parent c88d1e3 commit 59993c0
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 59993c0

Please sign in to comment.