From 42d9ba36562c368040c5c55ec47faed0f7a53248 Mon Sep 17 00:00:00 2001 From: Wouter Heirstrate Date: Fri, 18 Oct 2024 12:46:50 +0200 Subject: [PATCH] fix(ngx-layout): update change detection as soon as an item is toggled --- .../lib/components/accordion/item/accordion-item.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/layout/src/lib/components/accordion/item/accordion-item.component.ts b/libs/layout/src/lib/components/accordion/item/accordion-item.component.ts index 38dfef8d..9fab0496 100644 --- a/libs/layout/src/lib/components/accordion/item/accordion-item.component.ts +++ b/libs/layout/src/lib/components/accordion/item/accordion-item.component.ts @@ -173,7 +173,7 @@ export class NgxAccordionItemComponent implements OnInit, AfterViewInit, OnDestr // Iben: Listen to the open state of details and update the internal one this.renderer.listen(this.detailsElement.nativeElement, 'toggle', (event: ToggleEvent) => { - this.isOpen = event.newState === 'open'; + this.updateAccordionItemState(event.newState === 'open'); }); }