New to KendoReactStart a free 30-day trial

Change the expanded state of the Drawer when clicking outside of it

Environment

Product Version5.13.0
ProductProgress® KendoReact Drawer

Description

I want to hide the Drawer when I click outside of it

Solution

To handle the click event, add event listener to the document for the "mousedown" event. Within the event handler check if the clicked target is within the Drawer wrapping container element and if not, change the "expanded" state variable.

The following example demonstrates this approach:

Change Theme
Theme
Loading ...
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support