Skip to content

Commit 633e5dd

Browse files
jeffslofish64json
authored andcommitted
Fix errors when resizing panels horizontally. (algorithm-visualizer#265)
Closes algorithm-visualizer#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.
1 parent aca5633 commit 633e5dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/App/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class App extends BaseComponent {
206206

207207
handleChangeWorkspaceWeights(workspaceWeights) {
208208
this.setState({ workspaceWeights });
209-
this.codeEditorRef.current.getWrappedInstance().handleResize();
209+
this.codeEditorRef.current.handleResize();
210210
}
211211

212212
toggleNavigatorOpened(navigatorOpened = !this.state.workspaceVisibles[0]) {

src/components/CodeEditor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CodeEditor extends React.Component {
1616
}
1717

1818
handleResize() {
19-
this.aceEditorRef.current.getWrappedInstance().resize();
19+
this.aceEditorRef.current.resize();
2020
}
2121

2222
render() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy