From 86a030f30847cebef2f10239034025a138c8201d Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Thu, 23 Dec 2021 12:45:45 +0800 Subject: [PATCH] fix: double click to reset sidebar size --- src/components/SideBarBodyWrapper.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/SideBarBodyWrapper.tsx b/src/components/SideBarBodyWrapper.tsx index fe9ce13..9d05b46 100644 --- a/src/components/SideBarBodyWrapper.tsx +++ b/src/components/SideBarBodyWrapper.tsx @@ -104,7 +104,10 @@ export function SideBarBodyWrapper({ {features.resize && ( setSize(defaultConfigs.sideBarWidth)} + onResetSize={() => { + setSize(defaultConfigs.sideBarWidth) + apply(sizeVariableMountPoint, defaultConfigs.sideBarWidth) + }} onResizeStateChange={state => { blockLeaveRef.current = state === 'resizing' }}