Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): fix editor sidebar open on resize (#5262)

EYHN68e75778417b
diff --git a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx
index 62fd0b0838..f9d92564b4 100644
--- a/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx
+++ b/packages/frontend/core/src/pages/workspace/detail-page/detail-page.tsx
@@ -158,7 +158,7 @@ const DetailPageLayout = ({
onExpand={onExpandSidebar}
ref={sidebarRef}
defaultSizePixels={Math.max(sidebarState.width, 240)}
- minSizePixels={240}
+ minSizePixels={sidebarState.isOpen ? 240 : 0}
maxSizePercentage={50}
>
{sidebar}