Skip to content

Commit

Permalink
fix: Resolve the issue of incorrect parameter echo for resources unde…
Browse files Browse the repository at this point in the history
…r app editing (#1391)
  • Loading branch information
majianguang authored Apr 9, 2024
1 parent 01a8a0f commit 048ec71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/components/app/resource-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 048ec71

Please sign in to comment.