Skip to content

Commit

Permalink
fix(selectinput search)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixtedemaupeou committed Jun 5, 2018
1 parent 6918fc4 commit 522f900
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SelectInputContainer extends React.PureComponent {
}

handleClick (item) {
this.setState({ value: item.value, expanded: false })
this.setState({ value: item.value, expanded: false, search: '' })
if (this.props.onChange) { this.props.onChange(item.value) }
}

Expand All @@ -35,7 +35,7 @@ class SelectInputContainer extends React.PureComponent {
}

handleBlur () {
this.setState({ expanded: false })
this.setState({ expanded: false, search: '' })
if (this.props.onBlur) { this.props.onBlur() }
if (this.props.onChange) { this.props.onChange(this.state.value) }
}
Expand All @@ -46,7 +46,7 @@ class SelectInputContainer extends React.PureComponent {
}

handleClickOutside () {
this.setState({ expanded: false })
this.setState({ expanded: false, search: '' })
}

transform (elements, search) {
Expand Down

0 comments on commit 522f900

Please sign in to comment.