From cd3f7adcfb83ccc0e2c0ee12986f43ad81292d52 Mon Sep 17 00:00:00 2001 From: Wisani Shilumani Date: Fri, 13 Jul 2018 13:05:06 +0200 Subject: [PATCH] Optimize search --- components/browseArchives/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/browseArchives/index.js b/components/browseArchives/index.js index ca2a2b4..1da831e 100644 --- a/components/browseArchives/index.js +++ b/components/browseArchives/index.js @@ -74,6 +74,7 @@ class BrowseArchives extends React.Component { // Using static full interviews data array for now this.setState({ searchResults, + debounceTerm: this.state.term, }); } @@ -96,9 +97,6 @@ class BrowseArchives extends React.Component { getSearchResultsDebounce = _.debounce(() => { const { term } = this.state; this.getSearchResults(term); - this.setState({ - debounceTerm: term, - }); }, 700); clearSearchInput = () => {