fix: clear right sidebar resize constraints

This commit is contained in:
Bohdan Triapitsyn
2026-07-07 18:13:46 +03:00
parent 292e78f067
commit c801c7a74b
@@ -41,6 +41,20 @@ export const RightSidebar: React.FC<RightSidebarProps> = ({ isOpen, children, cl
const openWidth = Math.min(RIGHT_SIDEBAR_MAX_WIDTH, Math.max(RIGHT_SIDEBAR_MIN_WIDTH, rightSidebarWidth || RIGHT_SIDEBAR_CONTENT_WIDTH));
const appliedWidth = isOpen ? openWidth : 0;
React.useLayoutEffect(() => {
if (isResizing) {
return;
}
const sidebar = sidebarRef.current;
if (!sidebar) {
return;
}
sidebar.style.minWidth = '';
sidebar.style.maxWidth = '';
}, [isOpen, isResizing, openWidth]);
const handlePointerDown = (event: React.PointerEvent) => {
if (!isOpen) {
return;