diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-01 23:49:23 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-01 23:49:23 -0400 |
| commit | be3719bbbede85b4dd099f436b4f7d3bade157cb (patch) | |
| tree | 9cabeebc5ed0342956f2a0b7aa7eab5c2a907b68 /src/client/views/collections/CollectionSubView.tsx | |
| parent | 6d52cfb2a7b2b575f448e7d7c3f02a97afa0027b (diff) | |
Fixed treeview stuff
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index 2c2d74302..bcbde24f0 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -13,7 +13,7 @@ import { CollectionVideoView } from "./CollectionVideoView"; import { Doc, Opt } from "../../../new_fields/Doc"; import { DocComponent } from "../DocComponent"; import { listSpec } from "../../../new_fields/Schema"; -import { Cast, PromiseValue } from "../../../new_fields/Types"; +import { Cast, PromiseValue, FieldValue } from "../../../new_fields/Types"; import { List } from "../../../new_fields/List"; import { DocServer } from "../../DocServer"; import { ObjectField } from "../../../new_fields/ObjectField"; @@ -48,7 +48,9 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) { } get children() { - return Cast(this.props.Document[this.props.fieldKey], listSpec(Doc)); + //TODO tfs: This might not be what we want? + //This linter error can't be fixed because of how js arguments work, so don't switch this to filter(FieldValue) + return Cast(this.props.Document[this.props.fieldKey], listSpec(Doc), []).filter(doc => FieldValue(doc)); } @action |
