fix: foreignKey undefined in association field (#2903)
This commit is contained in:
parent
266a4ccb08
commit
6b46b166cd
@ -149,7 +149,7 @@ export default function useServiceOptions(props) {
|
|||||||
],
|
],
|
||||||
'$or',
|
'$or',
|
||||||
);
|
);
|
||||||
}, [collectionField?.interface, collectionField.foreignKey, fieldSchema, fieldServiceFilter, sourceValue]);
|
}, [collectionField?.interface, collectionField?.foreignKey, fieldSchema, fieldServiceFilter, sourceValue]);
|
||||||
|
|
||||||
return useMemo(() => {
|
return useMemo(() => {
|
||||||
return {
|
return {
|
||||||
|
@ -119,14 +119,12 @@ const WithForm = (props: WithFormProps) => {
|
|||||||
if (h.targetFields?.length) {
|
if (h.targetFields?.length) {
|
||||||
const fields = h.targetFields.join(',');
|
const fields = h.targetFields.join(',');
|
||||||
onFieldInit(`*(${fields})`, (field: any, form) => {
|
onFieldInit(`*(${fields})`, (field: any, form) => {
|
||||||
setTimeout(() => {
|
field['initProperty'] = field?.['initProperty'] ?? {
|
||||||
field['initProperty'] = field?.['initProperty'] ?? {
|
display: field.display,
|
||||||
display: field.display,
|
required: field.required,
|
||||||
required: field.required,
|
pattern: field.pattern,
|
||||||
pattern: field.pattern,
|
value: field.value || field.initialValue,
|
||||||
value: field.value || field.initialValue,
|
};
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
onFieldChange(`*(${fields})`, ['value', 'required', 'pattern', 'display'], (field: any) => {
|
onFieldChange(`*(${fields})`, ['value', 'required', 'pattern', 'display'], (field: any) => {
|
||||||
field.linkageProperty = {
|
field.linkageProperty = {
|
||||||
|
Loading…
Reference in New Issue
Block a user