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

## Environment

<table>
	<tbody>
		<tr>
			<td>Product Version</td>
			<td>5.13.0</td>
		</tr>
		<tr>
			<td>Product</td>
			<td>Progress® KendoReact Drawer</td>
		</tr>
	</tbody>
</table>

## 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:

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/layout/drawer-close-on-click/source.txt)
