Skip to content

Commit

Permalink
Adding units to flex properties
Browse files Browse the repository at this point in the history
  • Loading branch information
godsamit committed Jul 3, 2021
1 parent d307fa0 commit f031457
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Resizer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const Resizer = ({
const isTransition = collapseOptions?.buttonTransition !== 'none';
const collapseButton = collapseOptions ? (
<ButtonContainer $isVertical={isVertical} $grabberSize={grabberSizeWithUnit} $isLtr={isLtr}>
<div style={{ flex: `1 1 ${preButtonFlex}` }} />
<div style={{ flex: `1 1 ${preButtonFlex}px` }} />
<Transition
in={isTransition ? isHovered : true}
timeout={isTransition ? collapseOptions.buttonTransitionTimeout : 0}
Expand All @@ -126,7 +126,7 @@ export const Resizer = ({
{isCollapsed ? collapseOptions.afterToggleButton : collapseOptions.beforeToggleButton}
</ButtonWrapper>
</Transition>
<div style={{ flex: `1 1 ${postButtonFlex}` }} />
<div style={{ flex: `1 1 ${postButtonFlex}px` }} />
</ButtonContainer>
) : null;

Expand Down
3 changes: 2 additions & 1 deletion src/components/SplitPane/hooks/useSplitPaneResize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f031457

Please sign in to comment.