aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSubView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-11 13:59:54 -0500
committerbobzel <zzzman@gmail.com>2021-03-11 13:59:54 -0500
commit61deb85209901707dda51413f975ba09e835a1e9 (patch)
treee268bdb7f69994149813bda305dbb6be509a7334 /src/client/views/collections/CollectionSubView.tsx
parent1c562c545580f473f9f8a5113914290cd2590b0c (diff)
added optional stacking sidebar for PDFs. fixed pdfannos to not show linkbutton when selected. fixed stacking views to handle fitwidth text better (make height fit correctly when fitWidth)
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
-rw-r--r--src/client/views/collections/CollectionSubView.tsx5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index 59e1824c1..c63779f44 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -66,9 +66,7 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
@computed get dataField() {
// sets the dataDoc's data field to an empty list if the data field is undefined - prevents issues with addonly
// setTimeout changes it outside of the @computed section
- setTimeout(() => {
- if (!this.dataDoc[this.props.fieldKey]) this.dataDoc[this.props.fieldKey] = new List<Doc>();
- }, 1000);
+ !this.dataDoc[this.props.fieldKey] && setTimeout(() => this.dataDoc[this.props.fieldKey] = new List<Doc>());
return this.dataDoc[this.props.fieldKey];
}
@@ -480,7 +478,6 @@ import { FormattedTextBox, GoogleRef } from "../nodes/formattedText/FormattedTex
import { CollectionView, CollectionViewType, CollectionViewProps } from "./CollectionView";
import { SelectionManager } from "../../util/SelectionManager";
import { OverlayView } from "../OverlayView";
-import { setTimeout } from "timers";
import { Hypothesis } from "../../util/HypothesisUtils";
import { GetEffectiveAcl } from "../../../fields/util";