Skip to content

Commit

Permalink
Merge pull request #26460 from jorge-ji/my-first-storybook-contribution
Browse files Browse the repository at this point in the history
UI: Fix panel layout resizing do not apply when done too fast
  • Loading branch information
JReinhold authored May 7, 2024
2 parents 4ea3fcf + f4b07b5 commit abff28c
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit abff28c

Please sign in to comment.