You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Don't remount main split children on rhs collapse
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -93,14 +93,19 @@ export default class MainSplit extends React.Component {
|
|||||||
const bodyView = React.Children.only(this.props.children);
|
const bodyView = React.Children.only(this.props.children);
|
||||||
const panelView = this.props.panel;
|
const panelView = this.props.panel;
|
||||||
|
|
||||||
if (this.props.collapsedRhs || !panelView) {
|
const hasResizer = !this.props.collapsedRhs && panelView;
|
||||||
return bodyView;
|
|
||||||
} else {
|
let children;
|
||||||
return <div className="mx_MainSplit" ref={this._setResizeContainerRef}>
|
if (hasResizer) {
|
||||||
{ bodyView }
|
children = <React.Fragment>
|
||||||
<ResizeHandle reverse={true} />
|
<ResizeHandle reverse={true} />
|
||||||
{ panelView }
|
{ panelView }
|
||||||
</div>;
|
</React.Fragment>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return <div className="mx_MainSplit" ref={hasResizer ? this._setResizeContainerRef : undefined}>
|
||||||
|
{ bodyView }
|
||||||
|
{ children }
|
||||||
|
</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user