From 647d49f4d33eada3cbd3a6e679d6097a76234f1d Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 5 Apr 2021 15:46:24 -0400 Subject: fixes for docfilter autoheight --- src/client/views/collections/CollectionTreeView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/views/collections/CollectionTreeView.tsx') diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index b97d11629..a9e73583d 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -65,8 +65,9 @@ export class CollectionTreeView extends CollectionSubView = new Set(); observer: any; computeHeight = () => { - this.rootDoc._height = this.paddingTop() + 26/* bcz: ugh: title bar height hack ... get ref and compute instead */ + + const hgt = this.paddingTop() + 26/* bcz: ugh: title bar height hack ... get ref and compute instead */ + Array.from(this.refList).reduce((p, r) => p + Number(getComputedStyle(r).height.replace("px", "")), 0); + this.props.setHeight(hgt); } unobserveHeight = (ref: any) => this.refList.delete(ref); observerHeight = (ref: any) => { -- cgit v1.2.3-70-g09d2