From e215958b8b05d7a8ce9d82395e0640b5b37fb40d Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Fri, 5 Aug 2022 14:18:59 +0500 Subject: [PATCH] fix: after selecting file in sidebar collapse sidebar in mobile view --- web/src/containers/Studio/sideBar.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/containers/Studio/sideBar.tsx b/web/src/containers/Studio/sideBar.tsx index 3c0f639..6f53393 100644 --- a/web/src/containers/Studio/sideBar.tsx +++ b/web/src/containers/Studio/sideBar.tsx @@ -48,6 +48,11 @@ const SideBar = ({ setMobileOpen(!mobileOpen) } + const handleFileSelect = (filePath: string) => { + setMobileOpen(false) + handleSelect(filePath) + } + const defaultExpanded = useMemo(() => { const splittedPath = selectedFilePath.split('/') const arr = [''] @@ -176,7 +181,7 @@ const SideBar = ({