Skip to content

Commit

Permalink
Fixed #10775 - Dynamic Dialog | BlockUI | Modal layer enter-leave tra…
Browse files Browse the repository at this point in the history
…nsition
  • Loading branch information
yigitfindikli committed Oct 25, 2021
1 parent f22b538 commit 5365533
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/components/dynamicdialog/dynamicdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const hideAnimation = animation([
@Component({
selector: 'p-dynamicDialog',
template: `
<div #mask [ngClass]="{'p-dialog-mask':true, 'p-component-overlay p-dialog-mask-scrollblocker': config.modal !== false}">
<div #mask [ngClass]="{'p-dialog-mask':true, 'p-component-overlay-enter p-dialog-mask-scrollblocker': config.modal !== false}">
<div [ngClass]="{'p-dialog p-dynamic-dialog p-component':true, 'p-dialog-rtl': config.rtl}" [ngStyle]="config.style" [class]="config.styleClass"
[@animation]="{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}"
(@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog" *ngIf="visible"
Expand Down Expand Up @@ -124,13 +124,16 @@ export class DynamicDialogComponent implements AfterViewInit, OnDestroy {
break;

case 'void':
this.onContainerDestroy();
if (this.config.modal !== false) {
DomHandler.addClass(this.wrapper, 'p-component-overlay-leave');
}
break;
}
}

onAnimationEnd(event: AnimationEvent) {
if (event.toState === 'void') {
this.onContainerDestroy();
this.dialogRef.destroy();
}
}
Expand Down

0 comments on commit 5365533

Please sign in to comment.