From 2e375c6900c9f0b59c5d884ec42e71b8141a63ec Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Tue, 25 May 2021 23:19:39 +0800 Subject: [PATCH] fix: not collapse on leave when not in float mode --- src/components/SideBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index c4fe47e..54c9516 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -118,7 +118,7 @@ export function SideBar() { collapsed: error || !shouldShow, })} baseSize={baseSize} - onLeave={() => $shouldShow.onChange(false)} + onLeave={sidebarToggleMode === 'float' ? () => $shouldShow.onChange(false) : undefined} >