Skip to content

Commit

Permalink
Merge pull request #2085 from IgniteUI/bpenkov/overlay-close-on-esc
Browse files Browse the repository at this point in the history
Overlay - closeOnEsc docs
  • Loading branch information
Lipata committed Jul 20, 2020
2 parents 5f64e0d + cd743b7 commit 9e69789
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion en/components/overlay_main.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ defaultOverlaySettings = {
positionStrategy: new GlobalPositionStrategy(),
scrollStrategy: new NoOpScrollStrategy(),
modal: true,
closeOnOutsideClick: true
closeOnOutsideClick: true,
closeOnEscape: false
};
```
<div class="divider--half"></div>
Expand Down
3 changes: 2 additions & 1 deletion en/components/toggle.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ In the next sample, we'll use a different positioning strategy so that the conte
The `igxToggle` directive uses the [`IgxOverlayService`]({environment:angularApiUrl}/classes/igxoverlayservice.html) provider. The `open`, `close` and `toggle` methods accept optional overlay settings that control how the content is displayed. If omitted, the default overlay settings are used as seen in the previous sample.

>[!NOTE]
> By defaut the [`closeOnOutsideClick`]({environment:angularApiUrl}/interfaces/overlaysettings.html#closeonoutsideclick) property is set to `true`. In order to disable this functionallity, the property has to be set to `false`.
> By default, the [`closeOnOutsideClick`]({environment:angularApiUrl}/interfaces/overlaysettings.html#closeonoutsideclick) property is set to `true`. In order to disable this functionality, the property has to be set to `false`. Additionally, the [`closeOnEscape`]({environment:angularApiUrl}/interfaces/overlaysettings.html#closeonescape) property defaults to `false`, so in order to make use of it, we have to set it to `true`.
```typescript
// template.component.ts
Expand All @@ -99,6 +99,7 @@ The `igxToggle` directive uses the [`IgxOverlayService`]({environment:angularApi

public _overlaySettings = {
closeOnOutsideClick: false,
closeOnEscape: true,
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings)
};

Expand Down
3 changes: 2 additions & 1 deletion jp/components/overlay_main.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ defaultOverlaySettings = {
positionStrategy: new GlobalPositionStrategy(),
scrollStrategy: new NoOpScrollStrategy(),
modal: true,
closeOnOutsideClick: true
closeOnOutsideClick: true,
closeOnEscape: false
};
```
<div class="divider--half"></div>
Expand Down
3 changes: 2 additions & 1 deletion kr/components/overlay_main.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ defaultOverlaySettings = {
positionStrategy: new GlobalPositionStrategy(),
scrollStrategy: new NoOpScrollStrategy(),
modal: true,
closeOnOutsideClick: true
closeOnOutsideClick: true,
closeOnEscape: false
};
```
<div class="divider--half"></div>
Expand Down

0 comments on commit 9e69789

Please sign in to comment.