diff options
| author | bob <bcz@cs.brown.edu> | 2019-02-04 18:10:27 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-02-04 18:10:27 -0500 |
| commit | 00a4534c535281aaecf4b47da64f1a0770e3bf68 (patch) | |
| tree | ba26deb79349ccc472da4fa9c7bc85ec36dc1250 /src/views/collections/CollectionSchemaView.tsx | |
| parent | e79e53d78546501fc855b76a84f000289ed7433a (diff) | |
not working
Diffstat (limited to 'src/views/collections/CollectionSchemaView.tsx')
| -rw-r--r-- | src/views/collections/CollectionSchemaView.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/views/collections/CollectionSchemaView.tsx b/src/views/collections/CollectionSchemaView.tsx index 420a68cc9..f625b39c5 100644 --- a/src/views/collections/CollectionSchemaView.tsx +++ b/src/views/collections/CollectionSchemaView.tsx @@ -1,4 +1,4 @@ -import { DocumentContents } from "../nodes/DocumentView"; +import { DocumentContentsView } from "../nodes/DocumentView"; import React = require("react") import ReactTable, { ReactTableDefaults, CellInfo, ComponentPropsGetterRC, ComponentPropsGetterR } from "react-table"; import { observer } from "mobx-react"; @@ -14,19 +14,19 @@ import { CollectionViewBase } from "./CollectionViewBase"; @observer export class CollectionSchemaView extends CollectionViewBase { - public static LayoutString() { return '<CollectionSchemaView Document={Document} fieldKey={DataKey} ContainingDocumentView={ContainingDocumentView}/>'; } + public static LayoutString() { return '<CollectionSchemaView DocumentForCollection={Document} CollectionFieldKey={DataKey} ContainingDocumentView={ContainingDocumentContentsView}/>'; } @observable selectedIndex = 0; renderCell = (rowProps: CellInfo) => { - if (!this.props.ContainingDocumentView) { + if (!this.props.DocumentContentsContainingCollection) { return <div></div> } let props: FieldViewProps = { doc: rowProps.value[0], fieldKey: rowProps.value[1], - documentViewContainer: this.props.ContainingDocumentView + documentViewContainer: this.props.DocumentContentsContainingCollection } return ( <FieldView {...props} /> @@ -71,15 +71,15 @@ export class CollectionSchemaView extends CollectionViewBase { } render() { - const { Document, fieldKey } = this.props; + const { DocumentForCollection: Document, CollectionFieldKey: fieldKey } = this.props; const children = Document.GetListField<Document>(fieldKey, []); const columns = Document.GetListField(KS.ColumnsKey, [KS.Title, KS.Data, KS.Author]) let content; if (this.selectedIndex != -1) { - content = (<DocumentContents Document={children[this.selectedIndex]} - ContainingDocumentView={this.props.ContainingDocumentView} - ContainingCollectionView={undefined} />) + content = (<DocumentContentsView Document={children[this.selectedIndex]} + ContainingDocumentContentsView={this.props.DocumentContentsContainingCollection} + ContainingCollectionView={this} />) } else { content = <div /> } |
