This repository was archived by the owner on Jul 19, 2019. It is now read-only.
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
How set auto complete to empty #49
Closed
Description
I have a drop down representing the countries and auto complete representing the cities.
When I change country I want auto complete to be empty no matter was there previously.
Currently
How to achieve that ?
// My render
render: function() {
return (
<div className="form-field">
<label className="form-field__label">Location</label>
<div className="form-field__value">
<div className="selectcontainer">
<select className="input-select"
ref='country'
value={this.props.country}
onChange={this.onCountry}>
{countries.map(function(d){
return (<option key={d.code} value={d.code}>{d.name}</option>);
})}
</select>
</div>
(<Autocomplete
ref="city"
defaultValue={this.props.city}
getItemValue={R.identity}
onChange={this.onChange}
onSelect={this.onChange}
items={this.props.cities}
renderItem={function (city) {
return (<div key={city} >{city}</div>);
}} />)
</div>
</div>
);
}
Metadata
Metadata
Assignees
Labels
No labels