Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Fix panel layout resizing do not apply when done too fast #26460

Merged
3 changes: 2 additions & 1 deletion code/ui/manager/src/components/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const useLayoutSyncingState = ({
useLayoutEffect(() => {
if (
internalDraggingSizeState.isDragging || // wait with syncing managerLayoutState until user is done dragging
layoutStateIsEqual(prevManagerLayoutStateRef.current, internalDraggingSizeState) // don't sync managerLayoutState if it doesn't differ from internalDraggingSizeState
layoutStateIsEqual(managerLayoutState, internalDraggingSizeState) // don't sync managerLayoutState if it doesn't differ from internalDraggingSizeStatee)
) {
return;
}
Expand All @@ -95,6 +95,7 @@ const useLayoutSyncingState = ({
...nextState,
};
setManagerLayoutState(nextState);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [internalDraggingSizeState, setManagerLayoutState]);

const isPagesShown =
Expand Down