Reposition sticky headers when layout has changed
This commit is contained in:
parent
29c4d9ffd0
commit
650b683761
3 changed files with 13 additions and 0 deletions
|
@ -110,6 +110,12 @@ export default class LeftPanel extends React.Component<IProps, IState> {
|
|||
UIStore.instance.removeListener("ListContainer", this.refreshStickyHeaders);
|
||||
}
|
||||
|
||||
public componentDidUpdate(prevProps: IProps, prevState: IState): void {
|
||||
if (prevState.activeSpace !== this.state.activeSpace) {
|
||||
this.refreshStickyHeaders();
|
||||
}
|
||||
}
|
||||
|
||||
private updateActiveSpace = (activeSpace: Room) => {
|
||||
this.setState({ activeSpace });
|
||||
};
|
||||
|
@ -429,6 +435,7 @@ export default class LeftPanel extends React.Component<IProps, IState> {
|
|||
onBlur={this.onBlur}
|
||||
isMinimized={this.props.isMinimized}
|
||||
activeSpace={this.state.activeSpace}
|
||||
onListCollapse={this.refreshStickyHeaders}
|
||||
/>;
|
||||
|
||||
const containerClasses = classNames({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue