mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:15:11 +00:00
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',
|
||||
);
|
||||
}, [collectionField?.interface, collectionField.foreignKey, fieldSchema, fieldServiceFilter, sourceValue]);
|
||||
}, [collectionField?.interface, collectionField?.foreignKey, fieldSchema, fieldServiceFilter, sourceValue]);
|
||||
|
||||
return useMemo(() => {
|
||||
return {
|
||||
|
@ -119,14 +119,12 @@ const WithForm = (props: WithFormProps) => {
|
||||
if (h.targetFields?.length) {
|
||||
const fields = h.targetFields.join(',');
|
||||
onFieldInit(`*(${fields})`, (field: any, form) => {
|
||||
setTimeout(() => {
|
||||
field['initProperty'] = field?.['initProperty'] ?? {
|
||||
display: field.display,
|
||||
required: field.required,
|
||||
pattern: field.pattern,
|
||||
value: field.value || field.initialValue,
|
||||
};
|
||||
});
|
||||
field['initProperty'] = field?.['initProperty'] ?? {
|
||||
display: field.display,
|
||||
required: field.required,
|
||||
pattern: field.pattern,
|
||||
value: field.value || field.initialValue,
|
||||
};
|
||||
});
|
||||
onFieldChange(`*(${fields})`, ['value', 'required', 'pattern', 'display'], (field: any) => {
|
||||
field.linkageProperty = {
|
||||
|
Loading…
Reference in New Issue
Block a user