diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-18 16:43:22 -0700 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-18 16:43:22 -0700 |
| commit | 1793bb19d464efde28bcd0171910b0f03caae38b (patch) | |
| tree | ff59ae5e2ab89d03e2f85d9a6eb92a20dfb23d0f /src/client/views/collections/CollectionView.tsx | |
| parent | f52b7a81059c0b50ad6f56928adb057bf6902493 (diff) | |
| parent | 2a18e8cf0970d7173734b5009cfb4eb6ec766f34 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index acb66acdb..1cdcd9b27 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -72,7 +72,7 @@ export interface CollectionViewCustomProps { filterAddDocument: (doc: Doc | Doc[]) => boolean; // allows a document that renders a Collection view to filter or modify any documents added to the collection (see PresBox for an example) childLayoutTemplate?: () => Opt<Doc>; // specify a layout Doc template to use for children of the collection childLayoutString?: string; // specify a layout string to use for children of the collection - childOpacity?:() => number; + childOpacity?: () => number; } export interface CollectionRenderProps { @@ -118,10 +118,8 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus @action.bound addDocument = (doc: Doc | Doc[]): boolean => { - if (doc instanceof Doc) { - if (this.props.filterAddDocument?.(doc) === false) { - return false; - } + if (this.props.filterAddDocument?.(doc) === false) { + return false; } const docs = doc instanceof Doc ? [doc] : doc; const targetDataDoc = this.props.Document[DataSym]; |
