Possibility to remove 'x' for dialog closing

4 posts, 0 answers
  1. Ján
    Ján avatar
    18 posts
    Member since:
    Jun 2017

    Posted 04 Aug Link to this post

    Hello,

    i have a feature request for Kendo UI for Angular 2. It would be nice to have possibility to create dialogs without 'x' in the top right corner. For example if one wants to create a confirmation dialog hat only has 'yes'/no  buttons that user has to choose from, without possibility to dismiss dialog with 'x'.

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    628 posts

    Posted 08 Aug Link to this post

    Hi Ján,

    Thank you for the feedback. We have not included such an option, as there is a relatively straightforward approach to achieve the desired layout via CSS only:

    styles: [`
          >>> .k-window-actions.k-dialog-actions {
            display: none;
          }
        `]

    http://plnkr.co/edit/lvv2srQ61lm0fw471ac7?p=preview

    The whole title bar can also be removed altogether by omitting the "title" property:

    http://plnkr.co/edit/G6GFava2hQ0fqr0ycHMO?p=preview

    I hope this helps, but if you have the time, please submit a feature request to our UserVoice portal as well:

    http://kendoui-feedback.telerik.com/forums/555517-kendo-ui-for-angular-feedback/category/181426-dialog

    It is closely monitored, and helps us prioritize, based on customer demand, when updating our roadmap. Thank you in advance.

    Regards,
    Dimiter Topalov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Ján
    Ján avatar
    18 posts
    Member since:
    Jun 2017

    Posted 08 Aug in reply to Dimiter Topalov Link to this post

    This solution is fine for dialogs that we create using markup or if you want it globally. In our case, however, we use DialogService to spawn dialogs and in some cases we don't mind if it has close button, but in some cases we would like to remove it and currently this is not configurable

    I submitted a feature request to UserVoice

  4. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    628 posts

    Posted 09 Aug Link to this post

    Hello Ján,

    Thank you for submitting the feature request. Meanwhile you can use the following workaround to remove the close button conditionally, for example based on some class or other property of the click target that opens the Dialog via a service:

    http://plnkr.co/edit/AxEm6hP4yS6ZAmYW3JkQ?p=preview

    Direct DOM manipulation definitely is not the best way to accomplish the desired layout, but this is still a working option that you might consider until we provide a public API for enabling/disabling the close button.

    Regards,
    Dimiter Topalov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top