fix: 修复 Chained-Select 清除数据后还有逗号问题 Closes #10116 (#10341)

This commit is contained in:
吴多益 2024-05-31 12:12:48 +08:00 committed by GitHub
parent 8c7dbff724
commit 918d2ea1e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,7 +241,11 @@ export default class ChainedSelectControl extends React.Component<
? value.split(delimiter || ',')
: [];
arr.splice(index, arr.length - index);
arr.push(joinValues ? currentValue.value : currentValue);
const pushValue = joinValues ? currentValue.value : currentValue;
if (pushValue !== undefined) {
arr.push(pushValue);
}
const valueRes = this.array2value(arr);