forked from p96170835/amis
Merge pull request #516 from RickCole21/master
修复 Select 多选+autoComplete 时,重新拉取的问题
This commit is contained in:
commit
aa98610ed0
|
@ -453,9 +453,9 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
|||
}
|
||||
|
||||
handleStateChange(changes: any) {
|
||||
const {multiple, checkAll} = this.props;
|
||||
const {multiple, checkAll, loadOptions} = this.props;
|
||||
let {inputValue} = this.state;
|
||||
let update: any = {};
|
||||
const loadOptions = this.props.loadOptions;
|
||||
let doLoad = false;
|
||||
|
||||
switch (changes.type) {
|
||||
|
@ -464,9 +464,10 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
|||
update = {
|
||||
...update,
|
||||
isOpen: multiple ? true : false,
|
||||
isFocused: multiple && checkAll ? true : false
|
||||
isFocused: multiple && checkAll ? true : false,
|
||||
inputValue: !multiple ? '' : inputValue
|
||||
};
|
||||
doLoad = true;
|
||||
doLoad = !multiple;
|
||||
break;
|
||||
case DownshiftChangeTypes.changeInput:
|
||||
update.highlightedIndex = 0;
|
||||
|
|
Loading…
Reference in New Issue