diff --git a/src/components/GeneratedSchemas.ts b/src/components/GeneratedSchemas.ts index 18bf5ced..93e07842 100644 --- a/src/components/GeneratedSchemas.ts +++ b/src/components/GeneratedSchemas.ts @@ -21,7 +21,11 @@ export const GenerateSchemaAndUiSchema = ( }; const uiSchema: UiSchema = {}; //form ui schema let formValues: any = {}; - console.log('FormData', formData) + formData?.fields?.forEach(field => { + if (field.isHidden === true) { + field.isEditable = false; + } +}); formData?.fields?.forEach((field: Field) => { const { label, diff --git a/src/utils/Interfaces.ts b/src/utils/Interfaces.ts index 4bc89e2f..7a0b3f04 100644 --- a/src/utils/Interfaces.ts +++ b/src/utils/Interfaces.ts @@ -31,6 +31,7 @@ export interface Field { required?: boolean; default: string | number; isRequired?: boolean; + isHidden?: boolean; } export interface TenantCohortRoleMapping { tenantId: string;