Skip to content

Commit

Permalink
Fix #16634 - reset accordion ActiveTab public method (#16838)
Browse files Browse the repository at this point in the history
* reset accordion ActiveTab

* revert package-lock.json changes
  • Loading branch information
kievsash authored Dec 6, 2024
1 parent 846c5d9 commit 5f5f28c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/components/accordion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 5f5f28c

Please sign in to comment.