fix(ui): stop auto close of sidebar on resize (#18647)

This commit is contained in:
David Hill 2026-03-22 22:53:12 +00:00 committed by GitHub
parent c529529f84
commit 32f9dc6383
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2368,14 +2368,12 @@ export default function Layout(props: ParentProps) {
size={layout.sidebar.width()}
min={244}
max={typeof window === "undefined" ? 1000 : window.innerWidth * 0.3 + 64}
collapseThreshold={244}
onResize={(w) => {
setState("sizing", true)
if (sizet !== undefined) clearTimeout(sizet)
sizet = window.setTimeout(() => setState("sizing", false), 120)
layout.sidebar.resize(w)
}}
onCollapse={layout.sidebar.close}
/>
</div>
</Show>