From 633e5dd30a825de00d710b893d1bd2b38978d51c Mon Sep 17 00:00:00 2001 From: Jeffrey Fisher Date: Sat, 6 Jul 2019 04:05:27 -0700 Subject: [PATCH] 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. --- 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 0a89192..720ff5a 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 e950e73..efe8f12 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() {