Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Remove special case RHS resizer logic
Browse files Browse the repository at this point in the history
It doesn't seem to affect anything by being removed.
  • Loading branch information
turt2live committed Dec 10, 2019
1 parent b93cadf commit c8c3448
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/components/structures/MainSplit.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,6 @@ export default class MainSplit extends React.Component {
}
}

componentDidUpdate(prevProps) {
const wasExpanded = !this.props.collapsedRhs && prevProps.collapsedRhs;
const wasCollapsed = this.props.collapsedRhs && !prevProps.collapsedRhs;
const wasPanelSet = this.props.panel && !prevProps.panel;
const wasPanelCleared = !this.props.panel && prevProps.panel;

// TODO: TravisR - fix this logic

if (this.resizeContainer && (wasExpanded || wasPanelSet)) {
// The resizer can only be created when **both** expanded and the panel is
// set. Once both are true, the container ref will mount, which is required
// for the resizer to work.
this._createResizer();
} else if (this.resizer && (wasCollapsed || wasPanelCleared)) {
this.resizer.detach();
this.resizer = null;
}
}

render() {
const bodyView = React.Children.only(this.props.children);
const panelView = this.props.panel;
Expand Down

0 comments on commit c8c3448

Please sign in to comment.