提交 633e5dd3 编写于 作者: J Jeffrey Fisher 提交者: Jinseo Park

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.
上级 aca56339
...@@ -206,7 +206,7 @@ class App extends BaseComponent { ...@@ -206,7 +206,7 @@ class App extends BaseComponent {
handleChangeWorkspaceWeights(workspaceWeights) { handleChangeWorkspaceWeights(workspaceWeights) {
this.setState({ workspaceWeights }); this.setState({ workspaceWeights });
this.codeEditorRef.current.getWrappedInstance().handleResize(); this.codeEditorRef.current.handleResize();
} }
toggleNavigatorOpened(navigatorOpened = !this.state.workspaceVisibles[0]) { toggleNavigatorOpened(navigatorOpened = !this.state.workspaceVisibles[0]) {
......
...@@ -16,7 +16,7 @@ class CodeEditor extends React.Component { ...@@ -16,7 +16,7 @@ class CodeEditor extends React.Component {
} }
handleResize() { handleResize() {
this.aceEditorRef.current.getWrappedInstance().resize(); this.aceEditorRef.current.resize();
} }
render() { render() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册