Skip to content

Commit

Permalink
do not show clear button if value is an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
Marie Godon authored and Marie Godon committed Oct 19, 2017
1 parent b6ebce8 commit a8c7757
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 a8c7757

Please sign in to comment.