feat: filter field for google api windows (#1170)

This commit is contained in:
Egor Lezhnin authored and Danny Brown committed 2019-11-13 09:38:49 -05:00
1 parent c4adcfd39e
commit c59c5b3f14
9 files changed
+100 -43

No files matched your search

@@ -9,6 +9,7 @@ export default class LocationPicker extends Component {
error: null,
loading: true,
locations: [],
filterStr: "",
};
static propTypes = {
@@ -37,15 +38,23 @@ export default class LocationPicker extends Component {
}
render() {
const { locations, loading, error } = this.state;
const { locations, loading, error, filterStr } = this.state;
const { onSelect } = this.props;
return (
<LocationsList
locations={locations}
loading={loading}
error={error}
onSelect={onSelect}
/>
<div>
<input class="form-control gcp-input"
type="text"
value={ filterStr }
onChange={ e => this.setState({ filterStr: e.target.value }) }
/>
<LocationsList
locations={locations}
loading={loading}
error={error}
filter={filterStr}
onSelect={onSelect}
/>
</div>
);
}
}