aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search/SearchBox.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-02 14:03:36 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-02 14:03:36 -0400
commit9334c8d12df76df60eedcc093b986f42d1f7f67d (patch)
treec593a48ccac6a8cca2481901df72abeffcd688a2 /src/client/views/search/SearchBox.tsx
parent49cf949250fb9b01a8457c2c3dee60b19f60c036 (diff)
Refactored some search stuff and fixed treeview flyout min X
Diffstat (limited to 'src/client/views/search/SearchBox.tsx')
-rw-r--r--src/client/views/search/SearchBox.tsx15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index a2556133b..1f6835c26 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -102,20 +102,7 @@ export class SearchBox extends React.Component {
@action
getResults = async (query: string) => {
- let response = await rp.get(DocServer.prepend('/search'), {
- qs: {
- query
- }
- });
- let res: string[] = JSON.parse(response);
- const fields = await DocServer.GetRefFields(res);
- const docs: Doc[] = [];
- for (const id of res) {
- const field = fields[id];
- if (field instanceof Doc) {
- docs.push(field);
- }
- }
+ const { docs } = await SearchUtil.Search(query, true);
return FilterBox.Instance.filterDocsByType(docs);
}