Skip to content

Commit

Permalink
fix: clear search input on resetting state (#410)
Browse files Browse the repository at this point in the history
Co-authored-by: Hrusikesh Panda <mrchief@users.noreply.github.com>
  • Loading branch information
berdyshev and mrchief authored Aug 9, 2020
1 parent ace7f8a commit 945fdbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
}

Expand Down

0 comments on commit 945fdbb

Please # to comment.