Skip to content

Commit e0b15ac

Browse files
authored
Merge branch 'master' into PMiteva/cancellable_onSearchInput_10.1
2 parents e564acb + 4d2ca73 commit e0b15ac

File tree

8 files changed

+150
-139
lines changed

8 files changed

+150
-139
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ 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
- Make `onSearchInput` event cancellable. The event args type has been changed to `IComboSearchInputEventArgs`, which have the following properties: `searchText` - holds the text typed into the search input, `owner` - holds a reference to the combo component and `cancel` - indicates whether the event should be canceled.
1111
- `IgxOverlay`
12-
- 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+
- Added new property `closeOnEscape` in `OverlaySettings` that controls whether the overlay should close on escape keypress. By default `closeOnEsc` is set to `false`.
13+
- **Behavioral Change** - `modal` overlays shown directly through the Overlay Service no longer close on Escape by default. That behavior can now be specified using the `closeOnEscape` property.
1314
- `igxDialog`
14-
- Added `closeOnEscapeKey` - with it, the dialog can be allowed or prevented from closing when `Esc` is pressed.
15+
- Added `closeOnEscape` - with it, the dialog can be allowed or prevented from closing when `Esc` is pressed.
1516
- `IgxNavbar`:
1617
- **Breaking Changes** - The `igx-action-icon` has been renamed to `igx-navbar-action`. It should get renamed in your components via `ng update`;
1718
- `igxGrid`

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,8 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
783783

784784
this._modalOverlaySettings = {
785785
closeOnOutsideClick: true,
786-
closeOnEsc: true,
787786
modal: true,
787+
closeOnEscape: true,
788788
outlet: this.outlet
789789
};
790790

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

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,36 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
7373
@Input()
7474
public id = `igx-dialog-${DIALOG_ID++}`;
7575

76+
/**
77+
* Controls whether the dialog should be shown as modal. Defaults to `true`
78+
* ```html
79+
* <igx-dialog [isModal]="false" ></igx-dialog>
80+
* ```
81+
*/
7682
@Input()
77-
get isModal() {
83+
public get isModal() {
7884
return this._isModal;
7985
}
8086

81-
set isModal(val: boolean) {
87+
public set isModal(val: boolean) {
8288
this._overlayDefaultSettings.modal = val;
8389
this._isModal = val;
8490
}
8591

86-
get closeOnEscapeKey() {
87-
return this._closeOnEscapeKey;
92+
/**
93+
* Controls whether the dialog should close when `Esc` key is pressed. Defaults to `true`
94+
* ```html
95+
* <igx-dialog [closeOnEscape]="false" ></igx-dialog>
96+
* ```
97+
*/
98+
@Input()
99+
public get closeOnEscape() {
100+
return this._closeOnEscape;
88101
}
89102

90-
set closeOnEscapeKey(val: boolean) {
91-
this._overlayDefaultSettings.closeOnEsc = val;
92-
this._closeOnEscapeKey = val;
103+
public set closeOnEscape(val: boolean) {
104+
this._overlayDefaultSettings.closeOnEscape = val;
105+
this._closeOnEscape = val;
93106
}
94107

95108
/**
@@ -310,7 +323,7 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
310323

311324
private _overlayDefaultSettings: OverlaySettings;
312325
private _closeOnOutsideSelect = false;
313-
private _closeOnEscapeKey = true;
326+
private _closeOnEscape = true;
314327
private _isModal = true;
315328
protected destroy$ = new Subject<boolean>();
316329

@@ -414,7 +427,7 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
414427
positionStrategy: new GlobalPositionStrategy(this._positionSettings),
415428
scrollStrategy: new NoOpScrollStrategy(),
416429
modal: this.isModal,
417-
closeOnEsc: this._closeOnEscapeKey,
430+
closeOnEscape: this._closeOnEscape,
418431
closeOnOutsideClick: this.closeOnOutsideSelect
419432
};
420433
}

projects/igniteui-angular/src/lib/directives/toggle/toggle.directive.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ describe('IgxToggle', () => {
475475
positionStrategy: jasmine.any(ConnectedPositioningStrategy) as any,
476476
closeOnOutsideClick: true,
477477
modal: false,
478-
closeOnEsc: true,
479478
scrollStrategy: jasmine.any(AbsoluteScrollStrategy) as any,
480479
excludePositionTarget: true
481480
};
@@ -499,7 +498,6 @@ describe('IgxToggle', () => {
499498
positionStrategy: jasmine.any(ConnectedPositioningStrategy) as any,
500499
closeOnOutsideClick: true,
501500
modal: false,
502-
closeOnEsc: true,
503501
scrollStrategy: jasmine.any(AbsoluteScrollStrategy) as any,
504502
excludePositionTarget: true
505503
};
@@ -535,7 +533,6 @@ describe('IgxToggle', () => {
535533
positionStrategy: jasmine.any(ConnectedPositioningStrategy) as any,
536534
closeOnOutsideClick: true,
537535
modal: false,
538-
closeOnEsc: true,
539536
scrollStrategy: jasmine.any(AbsoluteScrollStrategy) as any,
540537
excludePositionTarget: true
541538
};
@@ -594,7 +591,6 @@ describe('IgxToggle', () => {
594591
positionStrategy: jasmine.any(ConnectedPositioningStrategy) as any,
595592
closeOnOutsideClick: true,
596593
modal: false,
597-
closeOnEsc: true,
598594
scrollStrategy: jasmine.any(AbsoluteScrollStrategy) as any,
599595
outlet: jasmine.any(IgxOverlayOutletDirective) as any,
600596
excludePositionTarget: true

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ export class IgxToggleActionDirective implements OnInit {
429429
scrollStrategy: new AbsoluteScrollStrategy(),
430430
closeOnOutsideClick: true,
431431
modal: false,
432-
closeOnEsc: true,
433432
excludePositionTarget: true
434433
};
435434
}

0 commit comments

Comments
 (0)