Skip to content

Commit

Permalink
fix: 修复 Chained-Select 清除数据后还有逗号问题 Closes #10116 (#10341)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwind committed May 31, 2024
1 parent 8c7dbff commit 918d2ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/amis/src/renderers/Form/ChainedSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 918d2ea

Please sign in to comment.