diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-02 15:17:59 -0400 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-02 15:17:59 -0400 |
| commit | 361c2101f7e3ce08f6ca45ad34256e11fe608700 (patch) | |
| tree | 7f2798ad7d4db608a25a8fac2a8365e333f7cc32 /src/client/views/search/SearchBox.tsx | |
| parent | 9b6a8b6685e1bb98960f650997663e5bb8501c4a (diff) | |
| parent | e68a306f8b75d84b589fff19ed8a141fe2162355 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/search/SearchBox.tsx')
| -rw-r--r-- | src/client/views/search/SearchBox.tsx | 15 |
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); } |
