diff options
| author | bobzel <zzzman@gmail.com> | 2020-10-11 17:22:03 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-10-11 17:22:03 -0400 |
| commit | 3256d0f42401b8dd8745e7f32c25033e118b444b (patch) | |
| tree | ccac3211edde4ce003a8bed0aba51dd76e8205f7 /src/client/views/collections/CollectionLinearView.tsx | |
| parent | 65448167a4db396b2ee3c56d870233f8ac182eb6 (diff) | |
removed setting fields to undefined when Acl is Private in hopes of not losing data when permissions are changed. prevented server writes on startup by making renderContentBounds setting a reaction, and making linearView not resize if documents are still promises and make text boxes not flip-flop their height all the time.
Diffstat (limited to 'src/client/views/collections/CollectionLinearView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionLinearView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionLinearView.tsx b/src/client/views/collections/CollectionLinearView.tsx index 859ee9362..0eac5136a 100644 --- a/src/client/views/collections/CollectionLinearView.tsx +++ b/src/client/views/collections/CollectionLinearView.tsx @@ -38,8 +38,8 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { componentDidMount() { // is there any reason this needs to exist? -syip. yes, it handles autoHeight for stacking views (masonry isn't yet supported). - this._widthDisposer = reaction(() => this.props.Document[HeightSym]() + this.childDocs.length + (this.props.Document.linearViewIsExpanded ? 1 : 0), - () => this.props.Document._width = 5 + (this.props.Document.linearViewIsExpanded ? this.childDocs.length * (this.props.Document[HeightSym]()) : 10), + this._widthDisposer = reaction(() => 5 + (this.props.Document.linearViewIsExpanded ? this.childDocs.length * (this.props.Document[HeightSym]()) : 10), + width => this.childDocs.length && (this.props.Document._width = width), { fireImmediately: true } ); |
