fix: 修复autocomplete的loading问题

This commit is contained in:
喻希里 2017-10-18 14:09:21 +08:00
parent 39cae5ffe9
commit 823e9f2a25

View File

@ -93,11 +93,13 @@ class UsernameAutoComplete extends Component {
render () {
const { dataSource, fetching } = this.state;
let { dataSource, fetching } = this.state;
const children = dataSource.map((item, index) => (
<Option key={index} value={'' + item.id}>{item.username}</Option>
))
if(!children.length){
fetching = false;
}
return (
<Select
mode="multiple"