mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
Merge pull request #1155 from 2betop/fix
修复 select autocomplete 可能初始不请求的问题
This commit is contained in:
commit
54b887347f
@ -48,11 +48,12 @@ export default class SelectControl extends React.Component<SelectProps, any> {
|
||||
|
||||
input: any;
|
||||
unHook: Function;
|
||||
lazyloadRemote: Function;
|
||||
constructor(props: SelectProps) {
|
||||
super(props);
|
||||
|
||||
this.changeValue = this.changeValue.bind(this);
|
||||
this.loadRemote = debouce(this.loadRemote.bind(this), 250, {
|
||||
this.lazyloadRemote = debouce(this.loadRemote.bind(this), 250, {
|
||||
trailing: true,
|
||||
leading: false
|
||||
});
|
||||
@ -242,7 +243,7 @@ export default class SelectControl extends React.Component<SelectProps, any> {
|
||||
value={selectedOptions}
|
||||
options={options}
|
||||
loadOptions={
|
||||
isEffectiveApi(autoComplete) ? this.loadRemote : undefined
|
||||
isEffectiveApi(autoComplete) ? this.lazyloadRemote : undefined
|
||||
}
|
||||
creatable={creatable}
|
||||
searchable={searchable || !!autoComplete}
|
||||
|
Loading…
Reference in New Issue
Block a user