fix: formula select pick wrong field

This commit is contained in:
sealday 2024-03-27 17:59:58 +08:00
parent 12142f9654
commit 03a0ba57ff
2 changed files with 5 additions and 2 deletions

View File

@ -89,7 +89,7 @@
"typescript": "5.1.3"
},
"volta": {
"node": "20.9.0",
"node": "20.12.0",
"yarn": "1.22.19"
},
"dependencies": {}

View File

@ -145,7 +145,10 @@ const replacePlaceholders = (inputStr, values) => {
const useLabelOptions = (others) => {
const fieldSchema = useFieldSchema();
const { getField } = useCollection_deprecated();
const collectionField = useMemo(() => getField(fieldSchema.name), [fieldSchema.name]);
const collectionField = useMemo(
() => getField(fieldSchema['x-collection-field']),
[fieldSchema['x-collection-field']],
);
const request = {
resource: collectionField?.target,
action: 'list',