fix: 修复nestedSelect 移动端下选中数据异常问题 (#5121)

This commit is contained in:
RickCole 2022-08-12 19:25:43 +08:00 committed by GitHub
parent a41b2c21ef
commit 5e045af00e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -455,15 +455,7 @@ export class Cascader extends React.Component<CascaderProps, CascaderState> {
if (onlyLeaf && selectedOptions.length && selectedOptions[0].children) {
return;
}
onChange(
joinValues
? selectedOptions
.map(item => item[valueField as string])
.join(delimiter)
: extractValue
? selectedOptions.map(item => item[valueField as string])
: selectedOptions
);
onChange(selectedOptions);
onClose && onClose();
}