diff options
| author | bob <bcz@cs.brown.edu> | 2019-02-06 16:11:42 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-02-06 16:11:42 -0500 |
| commit | 59d5992f2a101eff7743328c3fdefe6a0006ada9 (patch) | |
| tree | b28dbb2e06f1fffeafcd2b43845072f9f3f6f1fc /src/views/collections/CollectionViewBase.tsx | |
| parent | 7598b88bbad9690c59f8b164144aa0d02a0a211f (diff) | |
| parent | 84eea14a86265ce0585342d9f3a3c4107c02df17 (diff) | |
woring db stub.
Diffstat (limited to 'src/views/collections/CollectionViewBase.tsx')
| -rw-r--r-- | src/views/collections/CollectionViewBase.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/views/collections/CollectionViewBase.tsx b/src/views/collections/CollectionViewBase.tsx index e00a29978..4fce02ef6 100644 --- a/src/views/collections/CollectionViewBase.tsx +++ b/src/views/collections/CollectionViewBase.tsx @@ -1,7 +1,7 @@ import { action, computed } from "mobx"; import { observer } from "mobx-react"; import { Document } from "../../fields/Document"; -import { Opt, WAITING } from "../../fields/Field"; +import { Opt, FieldWaiting } from "../../fields/Field"; import { Key, KeyStore } from "../../fields/Key"; import { ListField } from "../../fields/ListField"; import { SelectionManager } from "../../util/SelectionManager"; @@ -31,7 +31,7 @@ export class CollectionViewBase extends React.Component<CollectionViewProps> { var isSelected = (this.props.ContainingDocumentView instanceof CollectionFreeFormDocumentView && SelectionManager.IsSelected(this.props.ContainingDocumentView)); var childSelected = SelectionManager.SelectedDocuments().some(view => view.props.ContainingCollectionView == this); var topMost = this.props.ContainingDocumentView != undefined && - this.props.ContainingDocumentView != WAITING && this.props.ContainingDocumentView.props.ContainingCollectionView != WAITING && ( + this.props.ContainingDocumentView != FieldWaiting && this.props.ContainingDocumentView.props.ContainingCollectionView != FieldWaiting && ( this.props.ContainingDocumentView.props.ContainingCollectionView == undefined || this.props.ContainingDocumentView.props.ContainingCollectionView instanceof CollectionDockingView); return isSelected || childSelected || topMost; @@ -39,14 +39,14 @@ export class CollectionViewBase extends React.Component<CollectionViewProps> { @action addDocument = (doc: Document): void => { //TODO This won't create the field if it doesn't already exist - const value = this.props.DocumentForCollection.GetFieldValue(this.props.CollectionFieldKey, ListField, new Array<Document>()) + const value = this.props.DocumentForCollection.GetData(this.props.CollectionFieldKey, ListField, new Array<Document>()) value.push(doc); } @action removeDocument = (doc: Document): void => { //TODO This won't create the field if it doesn't already exist - const value = this.props.DocumentForCollection.GetFieldValue(this.props.CollectionFieldKey, ListField, new Array<Document>()) + const value = this.props.DocumentForCollection.GetData(this.props.CollectionFieldKey, ListField, new Array<Document>()) if (value.indexOf(doc) !== -1) { value.splice(value.indexOf(doc), 1) |
