Skip to content

Commit 5687ab5

Browse files
feat(dialog): update dialog's show/hide animations to fadeIn/fadeOut #9516 (#9847)
1 parent d8507f8 commit 5687ab5

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,23 @@ All notable changes for each version of this project will be documented in this
66

77
### New Features
88
- `IgxCsvExporterService`, `IgxExcelExporterService`
9-
- Exporter services are no longer required to be provided in the application since they are now injected on a root level.
9+
- Exporter services are no longer required to be provided in the application since they are now injected on a root level.
10+
11+
### General
12+
13+
- `IgxDialog`
14+
- **Breaking Change** - The default positionSettings open/close animation has been changed to `fadeIn`/`fadeOut`. The open/close animation can be set through the position settings, e.g. change the animation to the previously default open/close animation:
15+
16+
```typescript
17+
import { slideInBottom, slideOutTop } from 'igniteui-angular';
18+
19+
@ViewChild('alert', { static: true }) public alert: IgxDialogComponent;
20+
public newPositionSettings: PositionSettings = {
21+
openAnimation: useAnimation(slideInBottom, { params: { fromPosition: 'translateY(100%)' } }),
22+
closeAnimation: useAnimation(slideOutTop, { params: { toPosition: 'translateY(-100%)'} })
23+
};
24+
this.alert.positionSettings = this.newPositionSettings;
25+
```
1026

1127
## 12.2.1
1228

projects/igniteui-angular/src/lib/dialog/dialog.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useAnimation } from '@angular/animations';
21
import { CommonModule } from '@angular/common';
32
import {
43
Component,
@@ -22,7 +21,7 @@ import { IgxRippleModule } from '../directives/ripple/ripple.directive';
2221
import { IgxDialogActionsDirective, IgxDialogTitleDirective } from './dialog.directives';
2322
import { IgxToggleModule, IgxToggleDirective } from '../directives/toggle/toggle.directive';
2423
import { OverlaySettings, GlobalPositionStrategy, NoOpScrollStrategy, PositionSettings } from '../services/public_api';
25-
import { slideInBottom, slideOutTop } from '../animations/slide/index';
24+
import {fadeIn, fadeOut} from '../animations/fade/index';
2625
import { IgxFocusModule } from '../directives/focus/focus.directive';
2726
import { CancelableEventArgs, IBaseEventArgs } from '../core/utils';
2827

@@ -459,8 +458,8 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
459458
protected destroy$ = new Subject<boolean>();
460459

461460
private _positionSettings: PositionSettings = {
462-
openAnimation: useAnimation(slideInBottom, { params: { fromPosition: 'translateY(100%)' } }),
463-
closeAnimation: useAnimation(slideOutTop, { params: { toPosition: 'translateY(-100%)' } })
461+
openAnimation: fadeIn,
462+
closeAnimation: fadeOut
464463
};
465464

466465
private _overlayDefaultSettings: OverlaySettings;

0 commit comments

Comments
 (0)