Fix errors when resizing panels horizontally. (#265)

Closes #264

getWrappedInstance() is no longer necessary.

If {forwardRef : true} has been passed to connect, adding a ref to the connected wrapper component will actually return the instance of the wrapped component.
This commit is contained in:
Jeffrey Fisher
2019-07-06 04:05:27 -07:00
committed by Jinseo Park
parent aca5633927
commit 633e5dd30a
2 changed files with 2 additions and 2 deletions

View File

@@ -206,7 +206,7 @@ class App extends BaseComponent {
handleChangeWorkspaceWeights(workspaceWeights) {
this.setState({ workspaceWeights });
this.codeEditorRef.current.getWrappedInstance().handleResize();
this.codeEditorRef.current.handleResize();
}
toggleNavigatorOpened(navigatorOpened = !this.state.workspaceVisibles[0]) {

View File

@@ -16,7 +16,7 @@ class CodeEditor extends React.Component {
}
handleResize() {
this.aceEditorRef.current.getWrappedInstance().resize();
this.aceEditorRef.current.resize();
}
render() {