summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/search_results.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/search_results.jsx b/webapp/components/search_results.jsx
index a0245b7e4..86d1bac1d 100644
--- a/webapp/components/search_results.jsx
+++ b/webapp/components/search_results.jsx
@@ -124,6 +124,12 @@ export default class SearchResults extends React.Component {
window.removeEventListener('resize', this.handleResize);
}
+ componentDidUpdate(prevProps, prevState) {
+ if (this.state.searchTerm !== prevState.searchTerm) {
+ this.resize();
+ }
+ }
+
handleResize() {
this.setState({
windowWidth: Utils.windowWidth(),