Merge pull request #4060 from blue-squirrel/fix-select-check

fix: Select checkAll: true & multiple: false时无法选中值修复
This commit is contained in:
RUNZE LU 2022-04-15 19:47:46 +08:00 committed by GitHub
commit 2b4e4945df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -883,7 +883,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
) : null}
{renderMenu ? (
checkAll || multiple ? (
multiple ? (
<Checkbox
checked={checked}
trueValue={item.value}
@ -913,7 +913,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
index
})
)
) : checkAll || multiple ? (
) : multiple ? (
<Checkbox
checked={checked}
trueValue={item.value}
@ -1101,7 +1101,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
isOpen={this.state.isOpen}
inputValue={inputValue}
onChange={
/*展示 Checkbox 的时候,会出发多次 onChange 原因待查*/ multiple ||
/*展示 Checkbox 的时候,会出发多次 onChange 原因待查*/ multiple &&
checkAll
? noop
: this.handleChange