Skip to content

Commit

Permalink
Fixed readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri-sakharov committed Dec 22, 2017
1 parent d2a3afd commit 3a4fe26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ class App extends React.Component {
console.log(`Selected: ${selectedOption.label}`);
}
render() {
const { selectedOption } = this.state;
const value = selectedOption && selectedOption.value;

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

0 comments on commit 3a4fe26

Please sign in to comment.