fix: Resolve the issue of incorrect parameter echo for resources under app editing (#1391)

This commit is contained in:
majianguang 2024-04-09 14:25:04 +08:00 committed by GitHub
parent 01a8a0fff6
commit 048ec71bdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,8 +61,9 @@ export default function ResourceCard(props: IProps) {
}, [resourceType]);
useEffect(() => {
updateResource(resourceValueOptions[0]?.label || editResource.value, 'value');
setResource({ ...resource, value: resourceValueOptions[0]?.label || editResource.value });
// fix bug Resolve the issue of incorrect parameter echo for resources under app editing
updateResource(editResource.value || resourceValueOptions[0]?.label, 'value');
setResource({ ...resource, value: editResource.value || resourceValueOptions[0]?.label });
}, [resourceValueOptions]);
return (