From 917c41dfa03779b8207aa81f975b0395be645929 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 13 Jul 2020 20:08:12 -0600 Subject: [PATCH] Update sticky headers when breadcrumbs pop in or out Fixes https://github.com/vector-im/riot-web/issues/14455 --- src/components/structures/LeftPanel2.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/structures/LeftPanel2.tsx b/src/components/structures/LeftPanel2.tsx index 58cf665430..9d836ddec3 100644 --- a/src/components/structures/LeftPanel2.tsx +++ b/src/components/structures/LeftPanel2.tsx @@ -111,6 +111,10 @@ export default class LeftPanel2 extends React.Component { 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); } };