Update sticky headers when breadcrumbs pop in or out

Fixes https://github.com/vector-im/riot-web/issues/14455
This commit is contained in:
Travis Ralston 2020-07-13 20:08:12 -06:00
parent 126aa862db
commit 917c41dfa0

View file

@ -111,6 +111,10 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
const newVal = BreadcrumbsStore.instance.visible;
if (newVal !== this.state.showBreadcrumbs) {
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);
}
};