diff options
author | Monika Hedman <monika_hedman@brown.edu> | 2019-04-30 16:34:01 -0400 |
---|---|---|
committer | Monika Hedman <monika_hedman@brown.edu> | 2019-04-30 16:34:01 -0400 |
commit | 77c575d5da1ecd9499dbc82c9686cf4cd87cf237 (patch) | |
tree | f88da703c58deb9d8788dd5840c34f2a549c1f45 /src | |
parent | df9fa3e362a6bdd616bc0b46ef9b425cfc5a010d (diff) | |
parent | be1976fb0ba33064978ee973993b3a2316cdf43c (diff) |
pre pull
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 1a953006a..8647ded8a 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -47,13 +47,10 @@ export class CollectionFreeFormView extends CollectionSubView { this._selectOnLoaded = newBox.Id;// track the new text box so we can give it a prop that tells it to focus itself when it's displayed this.addDocument(newBox, false); } - @action - private addDocument = (newBox: Document, allowDuplicates: boolean) => { - this.props.addDocument(newBox, false); - this.bringToFront(newBox); - return true; - } - private selectDocuments = (docs: Document[]) => { + + public addDocument = (newBox: Document, allowDuplicates: boolean) => this.props.addDocument(this.bringToFront(newBox), false); + + public selectDocuments = (docs: Document[]) => { SelectionManager.DeselectAll; docs.map(doc => DocumentManager.Instance.getDocumentView(doc)).filter(dv => dv).map(dv => SelectionManager.SelectDoc(dv!, true)); |