Skip to content

Commit

Permalink
Merge pull request #1048 from ryanzec/weird-spacing-fix
Browse files Browse the repository at this point in the history
Weird spacing fix
  • Loading branch information
JedWatson authored Jun 28, 2016
2 parents 99e4bc0 + 3ee7d86 commit 01de8d3
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 01de8d3

Please sign in to comment.