Skip to content

Commit 5da49c6

Browse files
committed
Bugfix; prevent width and height from leaking and being written to DOM
1 parent 83a4376 commit 5da49c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: lib/Resizable.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default class Resizable extends React.Component {
162162
}
163163

164164
render(): React.Element {
165-
let p = this.props;
165+
let {width, height, ...p} = this.props;
166166
let className = p.className ?
167167
`${p.className} react-resizable`:
168168
'react-resizable';

Diff for: lib/ResizableBox.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class ResizableBox extends React.Component {
3636
// If you use Resizable directly, you are responsible for updating the child component
3737
// with a new width and height.
3838
let {handleSize, onResizeStart, onResizeStop, draggableOpts,
39-
minConstraints, maxConstraints, lockAspectRatio, ...props} = this.props;
39+
minConstraints, maxConstraints, lockAspectRatio, width, height, ...props} = this.props;
4040
return (
4141
<Resizable
4242
handleSize={handleSize}

0 commit comments

Comments
 (0)