Skip to content

Commit

Permalink
Merge pull request #2349 from ali-master/patch-1
Browse files Browse the repository at this point in the history
fix: Mistake in the documentation
  • Loading branch information
JedWatson authored Apr 14, 2018
2 parents ab621bd + 34385b5 commit 4b9f4af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,12 @@ class App extends React.Component {
console.log(`Selected: ${selectedOption.label}`);
}
render() {
const { selectedOption } = this.state;
const value = selectedOption && selectedOption.value;
const { selectedOption } = this.state;

return (
<Select
name="form-field-name"
value={value}
value={selectedOption}
onChange={this.handleChange}
options={[
{ value: 'one', label: 'One' },
Expand Down

0 comments on commit 4b9f4af

Please sign in to comment.