Merge pull request #4969 from matrix-org/travis/room-list/breadcrumbs-headers
Update sticky headers when breadcrumbs pop in or out
This commit is contained in:
commit
6735724379
1 changed files with 4 additions and 0 deletions
|
@ -111,6 +111,10 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
|
||||||
const newVal = BreadcrumbsStore.instance.visible;
|
const newVal = BreadcrumbsStore.instance.visible;
|
||||||
if (newVal !== this.state.showBreadcrumbs) {
|
if (newVal !== this.state.showBreadcrumbs) {
|
||||||
this.setState({showBreadcrumbs: newVal});
|
this.setState({showBreadcrumbs: newVal});
|
||||||
|
|
||||||
|
// Update the sticky headers too as the breadcrumbs will be popping in or out.
|
||||||
|
if (!this.listContainerRef.current) return; // ignore: no headers to sticky
|
||||||
|
this.handleStickyHeaders(this.listContainerRef.current);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue