Updating search results on selecting topic/project

This commit is contained in:
Sharyn 2018-07-09 17:01:51 +02:00
parent a1476ae199
commit bc6e459dfe

View File

@ -43,7 +43,7 @@ class BrowseArchives extends React.Component {
this.setState({ isSearchActive: false });
}
// Throttle search result frequency with debounce
// Throttle search result frequency with debounce while typing
getSearchResults(term);
}
@ -65,10 +65,14 @@ class BrowseArchives extends React.Component {
}
setSearchTerm = (event) => {
const { term } = this.state;
this.setState({
term: event.target.innerText,
isSearchActive: true,
});
this.getSearchResults(term);
}
clearSearchInput = () => {