Kendo-angular: Modal support in Window like Dialog

Created on 13 May 2018  路  2Comments  路  Source: telerik/kendo-angular

Is it possible to add the modal feature to the window. This feature is currently only available for Dialog.

Question dialog

Most helpful comment

Based on the solution of @Raisolution I built a directive that automatically adds a div.k-overlay to the dom when the kendo-window is rendered.

The source can be found here. (Gist)
In case someone finds it useful, feel free to use it.

Usage

Just import the WindowWithBackdropDirective in your module(s), and add it to the kendo-window(s) which shall/must be a modal.

html <kendo-window withBackdrop *ngIf="opened"> <!-- window content --> </kendo-window>

All 2 comments

Hi @hhiliahh,

The Window is not modal by design. However, you could easily add the modal feature by including a div element with the k-overlay CSS class to the page (the same is used for the Dialog). Here is an example of this in action.

Based on the solution of @Raisolution I built a directive that automatically adds a div.k-overlay to the dom when the kendo-window is rendered.

The source can be found here. (Gist)
In case someone finds it useful, feel free to use it.

Usage

Just import the WindowWithBackdropDirective in your module(s), and add it to the kendo-window(s) which shall/must be a modal.

html <kendo-window withBackdrop *ngIf="opened"> <!-- window content --> </kendo-window>

Was this page helpful?
0 / 5 - 0 ratings