Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mmintel authored Jan 11, 2018
1 parent 4323f12 commit 1273f3f
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,20 +345,35 @@ The value for `autoComplete` should be from [this list of possible values](https
Usage example:
```JS
<Select
id="country"
multi={false} //required with autoComplete
autosize={false} //recommended with autoComplete
options={COUNTRIES}
simpleValue
name="country"
value={this.state.selectValue}
onChange={this.updateValue}
autoComplete="country"
onAutoFill={this.handleAutoFill}
id="country"
name="country"
autoComplete="country"
multi={false} //required with autoComplete
autosize={false} //recommended with autoComplete
options={COUNTRIES}
onAutoFill={this.handleAutoFill}
//... other props
/>
```

You can use the `onAutoFill` callback to react to autofill state changes.
Example for credit card expiry date selects:
```JS
<Select
autoComplete="cc-exp-month"
multi={false} //required with autoComplete
autosize={false} //recommended with autoComplete
//... other props
/>
<Select
autoComplete="cc-exp-year"
multi={false} //required with autoComplete
autosize={false} //recommended with autoComplete
//... other props
/>
```

You can use the `onAutoFill` callback to react to autofill state changes, for example to adjust the styling of a wrapper component.

This feature is currently only tested in Chrome >= v63.

### Select Props
Expand Down

0 comments on commit 1273f3f

Please sign in to comment.