mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix: use form values when customizing request action if record data is unavailable (#6196)
This commit is contained in:
parent
291c3025ba
commit
d313000274
@ -44,6 +44,11 @@ export const useCustomizeRequestActionProps = () => {
|
|||||||
await form.submit();
|
await form.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let currentRecordData = { ...recordData };
|
||||||
|
if (xAction === 'customize:form:request') {
|
||||||
|
currentRecordData = form.values;
|
||||||
|
}
|
||||||
|
|
||||||
actionField.data ??= {};
|
actionField.data ??= {};
|
||||||
actionField.data.loading = true;
|
actionField.data.loading = true;
|
||||||
try {
|
try {
|
||||||
@ -55,7 +60,7 @@ export const useCustomizeRequestActionProps = () => {
|
|||||||
// id: record[getPrimaryKey()],
|
// id: record[getPrimaryKey()],
|
||||||
// appends: result.params[0]?.appends,
|
// appends: result.params[0]?.appends,
|
||||||
dataSourceKey,
|
dataSourceKey,
|
||||||
data: recordData || form.values,
|
data: currentRecordData,
|
||||||
},
|
},
|
||||||
$nForm: blockType === 'form' ? form.values : undefined,
|
$nForm: blockType === 'form' ? form.values : undefined,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user