diff options
| author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-09-02 01:36:29 -0500 |
|---|---|---|
| committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-09-02 01:36:29 -0500 |
| commit | 13845edece4087447bf9817c250381e645ffe037 (patch) | |
| tree | 633c3e8671704906d9ab312a68dcf2ad47542c24 /src/client/views/collections/CollectionView.tsx | |
| parent | ccfcbd7394dc643babc390797ffc3bea71d9f84c (diff) | |
| parent | 6f72743516e47a6ad077bb8e894c8005fee29fc7 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_bug_fixes
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index 81403de46..cb053e85c 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -400,12 +400,19 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus const viewSpecScript = ScriptCast(this.props.Document.viewSpecScript); return viewSpecScript ? docs.filter(d => viewSpecScript.script.run({ doc: d }, console.log).result) : docs; } + @computed get _allFacets() { TraceMobx(); - const facets = new Set<string>(["type", "text", "data", "author", "ACL"]); + return ["author", "creationDate", "type", "text", "context"]; + const noviceReqFields = ["author", "creationDate", "type", "text", "context"]; + const noviceLayoutFields: string[] = [];//["_curPage"]; + const noviceFields = [...noviceReqFields, ...noviceLayoutFields]; + + const facets = new Set<string>([...noviceReqFields, ...noviceLayoutFields]); this.childDocs.filter(child => child).forEach(child => child && Object.keys(Doc.GetProto(child)).forEach(key => facets.add(key))); Doc.AreProtosEqual(this.dataDoc, this.props.Document) && this.childDocs.filter(child => child).forEach(child => Object.keys(child).forEach(key => facets.add(key))); - return Array.from(facets).filter(f => !f.startsWith("_") && !["proto", "zIndex", "isPrototype", "context", "text-noTemplate"].includes(f)).sort(); + + return Array.from(facets).filter(key => key[0] === "#" || key.indexOf("lastModified") !== -1 || (key[0] === key[0].toUpperCase() && !key.startsWith("_") && !key.startsWith("ACL")) || noviceFields.includes(key)).sort(); } /** |
