diff --git a/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/index.tsx b/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/index.tsx index e1d882ed5..7801011ee 100644 --- a/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/index.tsx +++ b/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/index.tsx @@ -43,7 +43,7 @@ export default function WidgetResourceOverview() { updateConfig: (config: ResourceOverviewWidgetProps) => updateConfig({ ...widget.config, ...config }), - onFieldChanged: (key: keyof ResourceOverviewWidgetProps, value: string) => { + onFieldChanged: (key: keyof ResourceOverviewWidgetProps, value: any) => { if (previewConfig) { updatePreview({ ...previewConfig, diff --git a/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/tags.tsx b/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/tags.tsx index 8d597d3a8..858ad3253 100644 --- a/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/tags.tsx +++ b/apps/admin-server/src/pages/projects/[project]/widgets/resourceoverview/[id]/tags.tsx @@ -121,20 +121,30 @@ export default function WidgetResourceOverviewTags( ) > -1 } onCheckedChange={(checked: any) => { - return checked - ? field.onChange([ - ...field.value, - { - type: groupName, - multiple: false, - label: '', - }, - ]) - : field.onChange( - field.value?.filter( - (val) => val.type !== groupName - ) - ); + if (checked) { + const updatedFields = [ + ...field.value, + { + type: groupName, + multiple: false, + label: '', + }, + ]; + field.onChange(updatedFields); + props.onFieldChanged( + 'tagGroups', + updatedFields + ); + } else { + const updatedFields = field.value?.filter( + (val) => val.type !== groupName + ); + field.onChange(updatedFields); + props.onFieldChanged( + 'tagGroups', + updatedFields + ); + } }} />