Skip to content

Commit

Permalink
fix(accordion): fixes animation glitch when opening several panels
Browse files Browse the repository at this point in the history
  • Loading branch information
maxokorokov committed Jan 22, 2021
1 parent 83431fb commit 0ad50b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/accordion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,11 @@ export class NgbAccordion implements AfterContentChecked {
if (panelElement) {
if (!panel.initClassDone) {
panel.initClassDone = true;
ngbRunTransition(
this._ngZone, panelElement, ngbCollapsingTransition,
{animation: false, runningTransition: 'stop', context: {direction: panel.isOpen ? 'show' : 'hide'}});
ngbRunTransition(this._ngZone, panelElement, ngbCollapsingTransition, {
animation: false,
runningTransition: 'continue',
context: {direction: panel.isOpen ? 'show' : 'hide'}
});
}
} else {
// Classes must be initialized next time it will be in the dom
Expand Down

0 comments on commit 0ad50b5

Please sign in to comment.