Merge remote-tracking branch 'baidu/master'
This commit is contained in:
commit
0ad0223239
|
@ -597,12 +597,12 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
|||
|
||||
let checkedAll = false;
|
||||
let checkedPartial = false;
|
||||
let filtedOptions: Array<Option> =
|
||||
inputValue && isOpen && !loadOptions
|
||||
? matchSorter(options, inputValue, {
|
||||
keys: [labelField || 'label', valueField || 'value']
|
||||
})
|
||||
: options.concat();
|
||||
let filtedOptions: Array<Option> = (inputValue && isOpen && !loadOptions
|
||||
? matchSorter(options, inputValue, {
|
||||
keys: [labelField || 'label', valueField || 'value']
|
||||
})
|
||||
: options.concat()
|
||||
).filter((option: Option) => !option.hidden && option.visible !== false);
|
||||
|
||||
const selectionValues = selection.map(select => select[valueField]);
|
||||
if (multiple && checkAll) {
|
||||
|
|
|
@ -166,7 +166,10 @@ export default class SelectControl extends React.Component<SelectProps, any> {
|
|||
if (
|
||||
!find(combinedOptions, (item: Option) => item.value == option.value)
|
||||
) {
|
||||
combinedOptions.push(option);
|
||||
combinedOptions.push({
|
||||
...option,
|
||||
hidden: true
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue