diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-02 14:03:36 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-02 14:03:36 -0400 |
| commit | 9334c8d12df76df60eedcc093b986f42d1f7f67d (patch) | |
| tree | c593a48ccac6a8cca2481901df72abeffcd688a2 /src/client/views/collections | |
| parent | 49cf949250fb9b01a8457c2c3dee60b19f60c036 (diff) | |
Refactored some search stuff and fixed treeview flyout min X
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/ParentDocumentSelector.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/ParentDocumentSelector.tsx b/src/client/views/collections/ParentDocumentSelector.tsx index b29a30069..c0f489cd8 100644 --- a/src/client/views/collections/ParentDocumentSelector.tsx +++ b/src/client/views/collections/ParentDocumentSelector.tsx @@ -23,9 +23,9 @@ export class SelectorContextMenu extends React.Component<SelectorProps> { async fetchDocuments() { let aliases = (await SearchUtil.GetAliasesOfDocument(this.props.Document)).filter(doc => doc !== this.props.Document); - const docs = await SearchUtil.Search(`data_l:"${this.props.Document[Id]}"`, true); + const { docs } = await SearchUtil.Search(`data_l:"${this.props.Document[Id]}"`, true); const map: Map<Doc, Doc> = new Map; - const allDocs = await Promise.all(aliases.map(doc => SearchUtil.Search(`data_l:"${doc[Id]}"`, true))); + const allDocs = await Promise.all(aliases.map(doc => SearchUtil.Search(`data_l:"${doc[Id]}"`, true).then(result => result.docs))); allDocs.forEach((docs, index) => docs.forEach(doc => map.set(doc, aliases[index]))); docs.forEach(doc => map.delete(doc)); runInAction(() => { |
