fix: 修复 combo 中有 pipeIn & pipeOut 场景时报错 Close: #8970 (#8980)

This commit is contained in:
liaoxuezhi 2023-12-01 14:53:46 +08:00 committed by GitHub
parent 02e3fe8c50
commit da257108a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -544,7 +544,8 @@ export default class ComboControl extends React.Component<ComboProps> {
const {flat, joinValues, delimiter, type, formItem} = props;
// 因为 combo 多个子表单可能同时发生变化。
// onChagne 触发多次,上次变更还没应用到 props.value 上来,这次触发变更就会包含历史数据,把上次触发的数据给重置成旧的了。
let value = formItem?.tmpValue || props.value;
// 通过 props.getValue() 拿到的是最新的
let value = props.getValue();
if (joinValues && flat && typeof value === 'string') {
value = value.split(delimiter || ',');