Browse Source

fix(dashboard): Fix custom field tab display logic

Michael Bromley 2 tháng trước cách đây
mục cha
commit
504fa9b33a

+ 1 - 1
packages/dashboard/src/lib/components/shared/custom-fields-form.tsx

@@ -72,7 +72,7 @@ export function CustomFieldsForm({ entityType, control, formPathPrefix }: Readon
     const shouldShowTabs = useMemo(() => {
         if (!customFields) return false;
         const hasTabbedFields = customFields.some(field => field.ui?.tab);
-        return hasTabbedFields || groupedFields.length > 1;
+        return hasTabbedFields && groupedFields.length > 1;
     }, [customFields, groupedFields.length]);
 
     if (!shouldShowTabs) {