🎬 fix Select search demo

close #18222
This commit is contained in:
afc163 2019-08-12 18:09:32 +08:00
parent d8af45d662
commit 29a47b0c7d

View File

@ -62,7 +62,11 @@ class SearchInput extends React.Component {
};
handleSearch = value => {
fetch(value, data => this.setState({ data }));
if (value) {
fetch(value, data => this.setState({ data }));
} else {
this.setState({ data: [] });
}
};
handleChange = value => {