From 945fdbbd98b81347017e80ec6763dd577552ac79 Mon Sep 17 00:00:00 2001 From: Artem Berdyshev Date: Sun, 9 Aug 2020 04:23:12 +0300 Subject: [PATCH] fix: clear search input on resetting state (#410) Co-authored-by: Hrusikesh Panda --- src/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 726e1c64..687202bc 100644 --- a/src/index.js +++ b/src/index.js @@ -90,8 +90,7 @@ class DropdownTreeSelect extends Component { resetSearchState = () => { // clear the search criteria and avoid react controlled/uncontrolled warning - // !this.props.inlineSearchInput is gated as inline search is not rendered until dropdown is shown - if (!this.props.inlineSearchInput) { + if (this.searchInput) { this.searchInput.value = '' }