Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 2daeece

Browse files
author
Jordan LaPointe
committed
Allow setting HTML autocomplete attribute
1 parent a9b5dd9 commit 2daeece

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Default value: `{}`
5353
Props that are applied to the `<input />` element rendered by
5454
`Autocomplete`. Any properties supported by `HTMLInputElement` can be
5555
specified, apart from the following which are set by `Autocomplete`:
56-
value, autoComplete, role, aria-autocomplete
56+
value, role, aria-autocomplete
5757

5858
### `menuStyle: Object` (optional)
5959
Default value:

lib/Autocomplete.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let Autocomplete = React.createClass({
7676
* Props that are applied to the `<input />` element rendered by
7777
* `Autocomplete`. Any properties supported by `HTMLInputElement` can be
7878
* specified, apart from the following which are set by `Autocomplete`:
79-
* value, autoComplete, role, aria-autocomplete
79+
* value, role, aria-autocomplete
8080
*/
8181
inputProps: PropTypes.object,
8282
/**
@@ -439,7 +439,7 @@ let Autocomplete = React.createClass({
439439
role="combobox"
440440
aria-autocomplete="list"
441441
aria-expanded={open}
442-
autoComplete="off"
442+
autoComplete={inputProps.autoComplete || 'off'}
443443
ref="input"
444444
onFocus={this.composeEventHandlers(this.handleInputFocus, inputProps.onFocus)}
445445
onBlur={this.composeEventHandlers(this.handleInputBlur, inputProps.onBlur)}

0 commit comments

Comments
 (0)