Skip to content

Commit

Permalink
improves autoFill behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
mmintel committed Dec 21, 2017
1 parent 1bdbcc0 commit 3ac4005
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions examples/src/components/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ import { COUNTRIES } from '../data/countries';
var AutoCompleteField = createClass({
displayName: 'AutoCompleteField',
propTypes: {
label: PropTypes.string,
autoComplete: PropTypes.string,
},
componentDidMount() {
// reveal hidden input for testing
document.querySelector('[autocomplete="country"]').classList.remove('Select-hidden');
},
getDefaultProps () {
return {
label: 'States:',
};
},
getInitialState () {
return {
selectValue: '',
Expand All @@ -32,9 +28,7 @@ var AutoCompleteField = createClass({
return (
<div className="section">
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/AutoComplete.js">(Source)</a></h3>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<input placeholder="email (for testing autoComplete)" type="email" autoComplete="email" />
</div>
<input placeholder="email (for testing autoComplete)" type="email" autoComplete="email" />
<Select
id="country"
ref="autoCompleteSelect"
Expand Down

0 comments on commit 3ac4005

Please sign in to comment.