betodealmeida commented on a change in pull request #12472:
URL: https://github.com/apache/superset/pull/12472#discussion_r556188583
##########
File path: superset-frontend/src/SqlLab/components/SouthPane.jsx
##########
@@ -90,20 +90,11 @@ export class SouthPane extends React.PureComponent {
height: props.height,
};
this.southPaneRef = React.createRef();
- this.getSouthPaneHeight = this.getSouthPaneHeight.bind(this);
this.switchTab = this.switchTab.bind(this);
}
- UNSAFE_componentWillReceiveProps() {
- // south pane expands the entire height of the tab content on mount
- this.setState({ height: this.getSouthPaneHeight() });
- }
-
- // One layer of abstraction for easy spying in unit tests
- getSouthPaneHeight() {
- return this.southPaneRef.current
- ? this.southPaneRef.current.clientHeight
- : 0;
+ UNSAFE_componentWillReceiveProps(props) {
+ this.setState({ height: props.height });
Review comment:
Oh, yeah — good point! :-P
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]