Skip to content

Commit 448fb37

Browse files
refactor(overlay): apply requested changes
1 parent b92b87e commit 448fb37

File tree

12 files changed

+3
-16
lines changed

12 files changed

+3
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ All notable changes for each version of this project will be documented in this
99
- **Behavioral Change** - Change default positioning strategy from `ConnectedPositioningStrategy` to `AutoPositionStrategy`. The [`Auto`](https://www.infragistics.com/products/ignite-ui-angular/angular/components/overlay_position.html#auto) strategy will initially try to show the element like the Connected strategy does. If the element goes out of the viewport Auto will flip the starting point and the direction, i.e. if the direction is 'bottom', it will switch it to 'top' and so on. If after flipping direction the content goes out of the view, auto strategy will revert to initial start point and direction and will push the content into the view. Note after pushing the content it may hide the combo's input.
1010
- `IgxOverlay`
1111
- Added new property - `closeOnEsc` - in `OverlaySettings`. The overlay can now be prevented from closing, on escape keypress, by setting the property to `false`, by default it's `true`.
12+
- `igxDialog`
13+
- Added `closeOnEscapeKey` - with it, the dialog can be allowed or prevented from closing when `Esc` is pressed.
1214
### New Features
1315
- `IgxGridState` directive
1416
- Added support for expansion states, column selection and row pinning.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
156156
private _overlaySettings: OverlaySettings = {
157157
scrollStrategy: new AbsoluteScrollStrategy(),
158158
positionStrategy: new AutoPositionStrategy(),
159-
closeOnEsc: true,
160159
modal: false,
161160
closeOnOutsideClick: true,
162161
excludePositionTarget: true

projects/igniteui-angular/src/lib/date-range-picker/date-range-picker.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,10 @@ export class IgxDateRangePickerComponent extends DisplayDensityBase
402402
private _focusedInput: IgxDateRangeInputsBaseComponent;
403403
private _dialogOverlaySettings: OverlaySettings = {
404404
closeOnOutsideClick: true,
405-
closeOnEsc: true,
406405
modal: true
407406
};
408407
private _dropDownOverlaySettings: OverlaySettings = {
409408
closeOnOutsideClick: true,
410-
closeOnEsc: true,
411409
modal: false
412410
};
413411
private onChangeCallback = (dateRange: DateRange) => { };

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
414414
positionStrategy: new GlobalPositionStrategy(this._positionSettings),
415415
scrollStrategy: new NoOpScrollStrategy(),
416416
modal: this.isModal,
417-
closeOnEsc: true,
417+
closeOnEsc: this._closeOnEscapeKey,
418418
closeOnOutsideClick: this.closeOnOutsideSelect
419419
};
420420
}

projects/igniteui-angular/src/lib/directives/autocomplete/autocomplete.directive.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ export class IgxAutocompleteDirective extends IgxDropDownItemNavigationDirective
8686

8787
private defaultSettings: OverlaySettings = {
8888
modal: false,
89-
closeOnEsc: true,
9089
scrollStrategy: new AbsoluteScrollStrategy(),
9190
positionStrategy: new AutoPositionStrategy({ target: this.parentElement }),
9291
excludePositionTarget: true

projects/igniteui-angular/src/lib/grids/filtering/advanced-filtering/advanced-filtering-dialog.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ export class IgxAdvancedFilteringDialogComponent implements AfterViewInit, OnDes
136136
private _overlaySettings: OverlaySettings = {
137137
closeOnOutsideClick: false,
138138
modal: false,
139-
closeOnEsc: true,
140139
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
141140
scrollStrategy: new CloseScrollStrategy()
142141
};
@@ -147,7 +146,6 @@ export class IgxAdvancedFilteringDialogComponent implements AfterViewInit, OnDes
147146
public columnSelectOverlaySettings: OverlaySettings = {
148147
scrollStrategy: new AbsoluteScrollStrategy(),
149148
modal: false,
150-
closeOnEsc: true,
151149
closeOnOutsideClick: false,
152150
excludePositionTarget: true
153151
};
@@ -158,7 +156,6 @@ export class IgxAdvancedFilteringDialogComponent implements AfterViewInit, OnDes
158156
public conditionSelectOverlaySettings: OverlaySettings = {
159157
scrollStrategy: new AbsoluteScrollStrategy(),
160158
modal: false,
161-
closeOnEsc: true,
162159
closeOnOutsideClick: false,
163160
excludePositionTarget: true
164161
};

projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
4747
excludePositionTarget: true,
4848
closeOnOutsideClick: true,
4949
modal: false,
50-
closeOnEsc: true,
5150
scrollStrategy: new AbsoluteScrollStrategy(),
5251
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings)
5352
};
@@ -56,7 +55,6 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
5655
excludePositionTarget: true,
5756
closeOnOutsideClick: true,
5857
modal: false,
59-
closeOnEsc: true,
6058
scrollStrategy: new AbsoluteScrollStrategy(),
6159
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings)
6260
};

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-default-expression.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export class IgxExcelStyleDefaultExpressionComponent implements AfterViewInit {
4343
public dropDownOverlaySettings: OverlaySettings = {
4444
scrollStrategy: new AbsoluteScrollStrategy(),
4545
modal: false,
46-
closeOnEsc: true,
4746
closeOnOutsideClick: true,
4847
excludePositionTarget: true
4948
};

projects/igniteui-angular/src/lib/grids/filtering/excel-style/grid.excel-style-filtering.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ export class IgxGridExcelStyleFilteringComponent implements OnDestroy {
209209
private _subMenuOverlaySettings: OverlaySettings = {
210210
closeOnOutsideClick: true,
211211
modal: false,
212-
closeOnEsc: true,
213212
positionStrategy: new AutoPositionStrategy(this._subMenuPositionSettings),
214213
scrollStrategy: new AbsoluteScrollStrategy()
215214
};

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export class IgxFilteringService implements OnDestroy {
9090
this._filterMenuOverlaySettings = {
9191
closeOnOutsideClick: true,
9292
modal: false,
93-
closeOnEsc: true,
9493
positionStrategy: new ExcelStylePositionStrategy(this._filterMenuPositionSettings),
9594
scrollStrategy: new AbsoluteScrollStrategy()
9695
};

0 commit comments

Comments
 (0)