Skip to content

Commit

Permalink
Issue feat:Restrict edit When ishidden field is true
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshataKatwal16 committed Dec 2, 2024
1 parent 4174e67 commit 7caa6e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/GeneratedSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/utils/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface Field {
required?: boolean;
default: string | number;
isRequired?: boolean;
isHidden?: boolean;
}
export interface TenantCohortRoleMapping {
tenantId: string;
Expand Down

0 comments on commit 7caa6e4

Please sign in to comment.