Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj committed Sep 12, 2024
1 parent 5a61c9b commit 6f8ec97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/src/client/components/buildPage/DynamicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export const DynamicForm: React.FC<DynamicFormProps> = ({
const isNonRefButDropDownFields = parser?.getNonRefButDropdownFields();
if (isNonRefButDropDownFields && isNonRefButDropDownFields[key]) {
propertyCopy = isNonRefButDropDownFields[key].htmlForSelectBox;
const metadata = isNonRefButDropDownFields[key]?.metadata;
if (metadata) {
propertyCopy.metadata = metadata;
}
}
}
return (
Expand Down
6 changes: 6 additions & 0 deletions app/src/client/components/buildPage/PropertySchemaParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ export class PropertySchemaParser implements PropertySchemaParserInterface {
},
initialFormValue: defaultValue?.value ?? null,
};

// Add metadata key only if it exists in the property
if ('metadata' in property) {
this.nonRefButDropdownFields[key].metadata = property.metadata;
}

defaultValues[key] = this.nonRefButDropdownFields[key].initialFormValue;
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/client/components/form/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const TextArea: React.FC<TextAreaProps> = ({ id, value, placeholder, onCh
value={value}
placeholder={placeholder}
onChange={(e) => onChange(e.target.value)}
className='my-2 p-2 border rounded w-full h-40'
className='my-2 p-2 border rounded w-full h-40 disabled:bg-airt-disabled-input-bg disabled:text-airt-disabled-input-color'
id={id}
disabled={isDisabled}
/>
Expand Down

0 comments on commit 6f8ec97

Please sign in to comment.