From 5f5f28c833f630733b3ea7c0ddf53e34b761b869 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Sat, 7 Dec 2024 01:57:18 +0200 Subject: [PATCH] Fix #16634 - reset accordion ActiveTab public method (#16838) * reset accordion ActiveTab * revert package-lock.json changes --- src/app/components/accordion/accordion.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/components/accordion/accordion.ts b/src/app/components/accordion/accordion.ts index f4759c232f5..46c58a727f1 100755 --- a/src/app/components/accordion/accordion.ts +++ b/src/app/components/accordion/accordion.ts @@ -568,6 +568,15 @@ export class Accordion implements BlockableUI, AfterContentInit, OnDestroy { event.preventDefault(); } + public resetActiveTab() { + this.tabs?.forEach((tab: AccordionTab) => { + tab.selected = false; + tab.changeDetector.markForCheck(); + }); + + this.activeIndex = null; + } + ngAfterContentInit() { this.initTabs();