mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-04 21:19:27 +08:00
Revert "fix: association field not submitting data when displaying field fro…" (#6796)
This reverts commit d4bf52a047243f5274e23dbf3e57e49d396dba00.
This commit is contained in:
parent
d4bf52a047
commit
c1f8b4d2f7
@ -1 +0,0 @@
|
||||
Subproject commit 7070b7ea1c0a10197c17e93ab079476813c36616
|
@ -105,23 +105,19 @@ function getFilteredFormValues(form) {
|
||||
allFields.push(field);
|
||||
}
|
||||
});
|
||||
const readonlyPaths = _.uniq(
|
||||
allFields
|
||||
.filter((field) => field?.componentProps?.readOnlySubmit)
|
||||
.map((field) => {
|
||||
const segments = field.path?.segments || [];
|
||||
if (segments.length <= 1) {
|
||||
return segments.join('.');
|
||||
}
|
||||
return segments.slice(0, -1).join('.');
|
||||
}),
|
||||
);
|
||||
readonlyPaths.forEach((path, index) => {
|
||||
if (index !== 0 || path.includes('.')) {
|
||||
// 清空值,但跳过第一层
|
||||
_.unset(values, path);
|
||||
}
|
||||
});
|
||||
const readonlyPaths = allFields
|
||||
.filter((field) => field?.componentProps?.readOnlySubmit)
|
||||
.map((field) => {
|
||||
const segments = field.path?.segments || [];
|
||||
if (segments.length <= 1) {
|
||||
return segments.join('.');
|
||||
}
|
||||
return segments.slice(0, -1).join('.');
|
||||
});
|
||||
for (const path of readonlyPaths) {
|
||||
_.unset(values, path);
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user