Skip to content

Commit

Permalink
Merge pull request #2074 from mariegodon/bug-2073
Browse files Browse the repository at this point in the history
do not show clear button if value is an empty string
  • Loading branch information
JedWatson authored Oct 19, 2017
2 parents 5455db3 + a8c7757 commit f3a46ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ class Select extends React.Component {
}

renderClear () {
if (!this.props.clearable || this.props.value === undefined || this.props.value === null || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return;
if (!this.props.clearable || this.props.value === undefined || this.props.value === null || this.props.value === '' || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return;
const clear = this.props.clearRenderer();

return (
Expand Down

0 comments on commit f3a46ce

Please sign in to comment.