From f031457700f26cba21507e4c909d6f414ceffcaf Mon Sep 17 00:00:00 2001 From: godsamit Date: Sat, 3 Jul 2021 01:05:32 -0400 Subject: [PATCH] Adding units to flex properties --- src/components/Resizer/index.tsx | 4 ++-- src/components/SplitPane/hooks/useSplitPaneResize.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Resizer/index.tsx b/src/components/Resizer/index.tsx index 196cf92..6379576 100644 --- a/src/components/Resizer/index.tsx +++ b/src/components/Resizer/index.tsx @@ -112,7 +112,7 @@ export const Resizer = ({ const isTransition = collapseOptions?.buttonTransition !== 'none'; const collapseButton = collapseOptions ? ( -
+
-
+
) : null; diff --git a/src/components/SplitPane/hooks/useSplitPaneResize.ts b/src/components/SplitPane/hooks/useSplitPaneResize.ts index e0f64c4..9e06fb4 100644 --- a/src/components/SplitPane/hooks/useSplitPaneResize.ts +++ b/src/components/SplitPane/hooks/useSplitPaneResize.ts @@ -142,7 +142,8 @@ export const useSplitPaneResize = (options: SplitPaneResizeOptions): SplitPaneRe }, [dragState, movedSizes, hooks]); useEffect(() => { hooks?.onCollapse?.(collapsedSizes); - }, [collapsedSizes, hooks]); + hooks?.onSaveSizes?.(movedSizes) + }, [collapsedSizes, movedSizes, hooks]); useEffect(() => { updateCollapsedSizes(collapsedIndices); // eslint-disable-next-line react-hooks/exhaustive-deps