From 3213d828b4386eabc2ee19b47279d0053958ea2a Mon Sep 17 00:00:00 2001 From: Jude Date: Sun, 24 Feb 2019 15:27:27 -0500 Subject: why doesn't this work --- src/client/views/collections/CollectionFreeFormView.tsx | 1 + src/client/views/collections/CollectionTreeView.tsx | 7 ++++--- src/client/views/collections/CollectionView.tsx | 6 ++++++ 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx index cb6668634..a6296ba3e 100644 --- a/src/client/views/collections/CollectionFreeFormView.tsx +++ b/src/client/views/collections/CollectionFreeFormView.tsx @@ -10,6 +10,7 @@ import { Transform } from "../../util/Transform"; import { undoBatch } from "../../util/UndoManager"; import { CollectionDockingView } from "../collections/CollectionDockingView"; import { CollectionSchemaView } from "../collections/CollectionSchemaView"; +import { CollectionTreeView } from "../collections/CollectionTreeView"; import { CollectionView } from "../collections/CollectionView"; import { CollectionFreeFormDocumentView } from "../nodes/CollectionFreeFormDocumentView"; import { DocumentView } from "../nodes/DocumentView"; diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index adc2e032d..90cd5a4c0 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -7,14 +7,15 @@ import { ListField } from "../../../fields/ListField"; @observer export class CollectionTreeView extends CollectionViewBase { - public static makeTreeView(document: Document) { - var children = document.GetT>(KeyStore.Data, ListField); + test = () => { + var children = this.props.Document.GetT>(KeyStore.Data, ListField); if (children != null) { console.log("\nNumber of Children: " + children); } + return "HELLO WORLD"; } render() { - return "HELLO WORLD"; + return { test }; } } \ No newline at end of file diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index 90080ab43..35ebb5687 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -11,6 +11,7 @@ import { CollectionFreeFormView } from "./CollectionFreeFormView"; import { CollectionDockingView } from "./CollectionDockingView"; import { CollectionSchemaView } from "./CollectionSchemaView"; import { CollectionViewProps } from "./CollectionViewBase"; +import { CollectionTreeView } from "./CollectionTreeView"; @@ -19,6 +20,7 @@ export enum CollectionViewType { Freeform, Schema, Docking, + Tree } export const COLLECTION_BORDER_WIDTH = 2; @@ -91,6 +93,10 @@ export class CollectionView extends React.Component { return () + case CollectionViewType.Tree: + return () default: return
} -- cgit v1.2.3-70-g09d2