This is a migrated thread and some comments may be shown as answers.

Don't want to auto-collapse on click

1 Answer 341 Views
Drawer
This is a migrated thread and some comments may be shown as answers.
Laurie
Top achievements
Rank 1
Iron
Laurie asked on 13 Sep 2019, 05:34 PM
If you look at the demo https://demos.telerik.com/aspnet-core/drawer/tag-helper, you can expand the drawer but as soon as you click one of the drawer items it auto-collapses. How can we avoid this behavior and keep the drawer expanded?

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetomir
Telerik team
answered on 18 Sep 2019, 07:23 AM
Hi Laurie,

When the Kendo UI Drawer is about to be closed, the hide event it triggered. This is event is preventable, therefore, you would be able to prevent the drawer from being closed, except when the "sandwich" icon is clicked:

<kendo-drawer name="drawer" template-id="template" mode="push" on-hide="onHide" position="left" min-height="330" .   .   . swipe-to-open="true">

And the JavaScript handler:

function onHide(e) {
    e.preventDefault();
}

Give this suggestion a try and let me know how it works out for you.


Best regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Drawer
Asked by
Laurie
Top achievements
Rank 1
Iron
Answers by
Tsvetomir
Telerik team
Share this question
or