From dab1e5334e3e37d6b188c4d620acb07cf8c8d4c2 Mon Sep 17 00:00:00 2001 From: Sundeep Chand Date: Mon, 27 Jul 2020 23:47:51 +0530 Subject: [PATCH] fixed search result reset issue --- client/modules/IDE/components/Searchbar/Searchbar.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/modules/IDE/components/Searchbar/Searchbar.jsx b/client/modules/IDE/components/Searchbar/Searchbar.jsx index b81b3bea..cd9693bd 100644 --- a/client/modules/IDE/components/Searchbar/Searchbar.jsx +++ b/client/modules/IDE/components/Searchbar/Searchbar.jsx @@ -35,6 +35,11 @@ class Searchbar extends React.Component { }; handleSearchChange = (e) => { + if (e.target.value === '') { + // Manually reset the searchValue if the search field becomes empty. + this.handleResetSearch(); + return; + } this.setState({ searchValue: e.target.value }, () => { this.throttledSearchChange(this.state.searchValue); });