Fix:Resolves the issue of sessions not being saved when the variable is array<object>. (#11446)

### What problem does this PR solve?

Fix:Resolves the issue of sessions not being saved when the variable is
array<object>.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-11-21 17:20:26 +08:00
committed by GitHub
parent 13299197b8
commit a0959b9d38
5 changed files with 38 additions and 10 deletions

View File

@ -356,6 +356,13 @@ const DynamicForm = {
...combinedErrors,
...fieldErrors,
} as any;
console.log('combinedErrors', combinedErrors);
for (const key in combinedErrors) {
if (Array.isArray(combinedErrors[key])) {
combinedErrors[key] = combinedErrors[key][0];
}
}
console.log('combinedErrors', combinedErrors);
return {
values: Object.keys(combinedErrors).length ? {} : data,
@ -720,9 +727,7 @@ const DynamicForm = {
type="button"
disabled={submitLoading}
onClick={() => {
console.log('form submit');
(async () => {
console.log('form submit2');
try {
let beValid = await form.formControl.trigger();
console.log('form valid', beValid, form, form.formControl);