Skip to content

Commit

Permalink
Fix #3534: Splitter: widths provided to SplitterPanel.size are not co…
Browse files Browse the repository at this point in the history
…rrectly applied (#3535)

* Fix: #3534

* lint
  • Loading branch information
kalinkrustev authored Oct 31, 2022
1 parent 544d1f2 commit 0792351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/splitter/Splitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Splitter = React.memo(
const isStateful = props.stateKey != null;
const childrenLength = props.children && props.children.length;

const panelSize = (sizes, index) => (index in sizes ? sizes[index] : (props.children[index].props.size || 100) / childrenLength);
const panelSize = (sizes, index) => (index in sizes ? sizes[index] : props.children[index].props.size || 100 / childrenLength);

const [bindDocumentMouseMoveListener, unbindDocumentMouseMoveListener] = useEventListener({ type: 'mousemove', listener: (event) => onResize(event) });
const [bindDocumentMouseUpListener, unbindDocumentMouseUpListener] = useEventListener({
Expand Down

0 comments on commit 0792351

Please sign in to comment.