diff --git a/README.md b/README.md index 3358868..d6f5f34 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ const items = [ diff --git a/src/AutoComplete/AutoComplete.js b/src/AutoComplete/AutoComplete.js index eaeffa2..09be389 100644 --- a/src/AutoComplete/AutoComplete.js +++ b/src/AutoComplete/AutoComplete.js @@ -13,6 +13,7 @@ export default class AutoComplete extends Component { static propTypes = { align: PropTypes.string, + autoComplete: PropTypes.string, className: PropTypes.string, dataIndex: PropTypes.string.isRequired, disabled: PropTypes.bool, @@ -76,7 +77,7 @@ export default class AutoComplete extends Component { render() { const { - align, className, dataIndex, disabled, error, floatingLabel, + align, autoComplete, className, dataIndex, disabled, error, floatingLabel, items, label, offset, readOnly, value, valueIndex, } = this.props const { focused, value: stateValue } = this.state @@ -111,6 +112,7 @@ export default class AutoComplete extends Component { floatingLabel, label, readOnly: disabled, + autoComplete, ref: ref => this.input = ref, type: 'text', onChange: this.onTextfieldChange, diff --git a/stories/AutoComplete.story.js b/stories/AutoComplete.story.js index 80d0c9f..4d92a8d 100644 --- a/stories/AutoComplete.story.js +++ b/stories/AutoComplete.story.js @@ -85,6 +85,25 @@ storiesOf('AutoComplete', module) disabled /> )) + .add('autocomplete off', () => ( +
+ Turn off browser autofill + + Browser default behaviour + +
+ )) .add('lots of values', () => (