Skip to content

Commit

Permalink
fixed issue with chrome showing some extra spacing below the input in…
Browse files Browse the repository at this point in the history
… certain circumstances
  • Loading branch information
Ryan Zec committed Jun 27, 2016
1 parent c67f0b2 commit 3ee7d86
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,20 +513,23 @@ const Select = React.createClass({
},

selectValue (value) {
//NOTE: update value in the callback to make sure the input value is empty so that there are no sttyling issues (Chrome had issue otherwise)
this.hasScrolledToOption = false;
if (this.props.multi) {
this.addValue(value);
this.setState({
inputValue: '',
focusedIndex: null
}, () => {
this.addValue(value);
});
} else {
this.setState({
isOpen: false,
inputValue: '',
isPseudoFocused: this.state.isFocused,
}, () => {
this.setValue(value);
});
this.setValue(value);
}
},

Expand Down

0 comments on commit 3ee7d86

Please sign in to comment.