diff --git a/src/index.tsx b/src/index.tsx index cd2afd38..f58fb1ca 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -926,12 +926,6 @@ export class Resizable extends React.PureComponent { ); } - ref = (c: HTMLElement | null) => { - if (c) { - this.resizable = c; - } - }; - render() { const extendsProps = Object.keys(this.props).reduce((acc, key) => { if (definedProps.indexOf(key) !== -1) { @@ -961,7 +955,18 @@ export class Resizable extends React.PureComponent { const Wrapper = this.props.as || 'div'; return ( - + { + if (c) { + this.resizable = c; + } + }} + > {this.state.isResizing &&
} {this.props.children} {this.renderResizer()}