Skip to content

Commit 6f0ef30

Browse files
authored
Merge branch 'master' into simeonoff/fix-9975
2 parents 3a9c1e8 + 5687ab5 commit 6f0ef30

File tree

5 files changed

+36
-18
lines changed

5 files changed

+36
-18
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;

projects/igniteui-angular/src/lib/grids/filtering/grid-filtering.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,10 @@ export class IgxFilteringService implements OnDestroy {
277277
}
278278
}
279279

280+
const emptyFilter = new FilteringExpressionsTree(null, field);
280281
const onFilteringEventArgs: IFilteringEventArgs = {
281282
owner: this.grid,
282-
filteringExpressions: null,
283+
filteringExpressions: emptyFilter,
283284
cancel: false };
284285

285286
this.grid.filtering.emit(onFilteringEventArgs);
@@ -292,7 +293,7 @@ export class IgxFilteringService implements OnDestroy {
292293
this.clear_filter(field);
293294

294295
// Wait for the change detection to update filtered data through the pipes and then emit the event.
295-
requestAnimationFrame(() => this.grid.filteringDone.emit(null));
296+
requestAnimationFrame(() => this.grid.filteringDone.emit(emptyFilter));
296297

297298
if (field) {
298299
const expressions = this.getExpressions(field);

projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,10 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
485485
GridFunctions.clickFilterCellChip(fix, columnName);
486486
GridFunctions.resetFilterRow(fix);
487487

488-
expect(grid.filtering.emit).toHaveBeenCalledWith({ owner: grid, cancel: false, filteringExpressions: null });
488+
const emptyFilter = new FilteringExpressionsTree(null, columnName);
489+
expect(grid.filtering.emit).toHaveBeenCalledWith({ owner: grid, cancel: false, filteringExpressions: emptyFilter });
489490
expect(grid.filtering.emit).toHaveBeenCalledTimes(2);
490-
expect(grid.filteringDone.emit).toHaveBeenCalledWith(null);
491+
expect(grid.filteringDone.emit).toHaveBeenCalledWith(emptyFilter);
491492
expect(grid.filteringDone.emit).toHaveBeenCalledTimes(2);
492493

493494
const filterUiRow = fix.debugElement.query(By.css(FILTER_UI_ROW));
@@ -512,9 +513,10 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
512513
tick(100);
513514
fix.detectChanges();
514515

515-
const args = { owner: grid, cancel: false, filteringExpressions: null };
516+
const emptyFilter = new FilteringExpressionsTree(null, columnName);
517+
const args = { owner: grid, cancel: false, filteringExpressions: emptyFilter };
516518
expect(grid.filtering.emit).toHaveBeenCalledWith(args);
517-
expect(grid.filteringDone.emit).toHaveBeenCalledWith(null);
519+
expect(grid.filteringDone.emit).toHaveBeenCalledWith(emptyFilter);
518520
}));
519521

520522
it('Removing second condition removes the And/Or button', fakeAsync(() => {
@@ -826,13 +828,14 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
826828
spyOn(grid.filtering, 'emit');
827829
spyOn(grid.filteringDone, 'emit');
828830

829-
grid.filter('ProductName', 'I', IgxStringFilteringOperand.instance().condition('startsWith'));
831+
const columnName = 'ProductName';
832+
grid.filter(columnName, 'I', IgxStringFilteringOperand.instance().condition('startsWith'));
830833
tick(30);
831834
fix.detectChanges();
832835

833836
expect(grid.rowList.length).toEqual(2);
834837

835-
const filteringExpressions = grid.filteringExpressionsTree.find('ProductName') as FilteringExpressionsTree;
838+
const filteringExpressions = grid.filteringExpressionsTree.find(columnName) as FilteringExpressionsTree;
836839
const args = { owner: grid, cancel: false, filteringExpressions };
837840
expect(grid.filtering.emit).toHaveBeenCalledWith(args);
838841
expect(grid.filtering.emit).toHaveBeenCalledTimes(1);
@@ -849,10 +852,11 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
849852

850853
expect(grid.rowList.length).toEqual(8);
851854

852-
args.filteringExpressions = null;
855+
const emptyFilter = new FilteringExpressionsTree(null, columnName);
856+
args.filteringExpressions = emptyFilter;
853857
expect(grid.filtering.emit).toHaveBeenCalledWith(args);
854858
expect(grid.filtering.emit).toHaveBeenCalledTimes(2);
855-
expect(grid.filteringDone.emit).toHaveBeenCalledWith(null);
859+
expect(grid.filteringDone.emit).toHaveBeenCalledWith(emptyFilter);
856860
expect(grid.filteringDone.emit).toHaveBeenCalledTimes(2);
857861
}));
858862

projects/igniteui-angular/src/lib/services/overlay/overlay.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,6 @@ export class IgxOverlayService implements OnDestroy {
745745
wrapperElement.style.transitionDuration = '0ms';
746746
return;
747747
}
748-
if (animationOptions.type === AnimationMetadataType.AnimateRef) {
749-
animationOptions = (animationOptions as AnimationAnimateRefMetadata).animation;
750-
}
751748
if (!animationOptions.options || !animationOptions.options.params) {
752749
return;
753750
}
@@ -893,6 +890,7 @@ export class IgxOverlayService implements OnDestroy {
893890
private removeModalClasses(info: OverlayInfo) {
894891
if (info.settings.modal) {
895892
const wrapperElement = info.elementRef.nativeElement.parentElement.parentElement;
893+
this.applyAnimationParams(wrapperElement, info.settings.positionStrategy.settings.closeAnimation);
896894
wrapperElement.classList.remove('igx-overlay__wrapper--modal');
897895
wrapperElement.classList.add('igx-overlay__wrapper');
898896
}

0 commit comments

Comments
 (0)