From 2d85efad3b5fbc41ee875a6bad609c41c01e1c83 Mon Sep 17 00:00:00 2001 From: Jeffrey Fisher Date: Fri, 5 Jul 2019 11:18:52 -0700 Subject: [PATCH] Fix errors when resizing panels horizontally. 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. --- src/components/App/index.js | 2 +- src/components/CodeEditor/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/App/index.js b/src/components/App/index.js index 0a891927..720ff5ae 100644 --- a/src/components/App/index.js +++ b/src/components/App/index.js @@ -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]) { diff --git a/src/components/CodeEditor/index.js b/src/components/CodeEditor/index.js index e950e73d..efe8f127 100644 --- a/src/components/CodeEditor/index.js +++ b/src/components/CodeEditor/index.js @@ -16,7 +16,7 @@ class CodeEditor extends React.Component { } handleResize() { - this.aceEditorRef.current.getWrappedInstance().resize(); + this.aceEditorRef.current.resize(); } render() {