Skip to content

Commit

Permalink
Make custom manifest code editor read-only (openshift-assisted#2273)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Kilzi <[email protected]>
  • Loading branch information
2 people authored and rawagner committed Sep 13, 2023
1 parent 138ae64 commit 86a1e16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/ui-lib/lib/common/components/ui/formik/CodeField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const CodeField = ({
isDisabled,
downloadFileName,
dataTestid,
isReadOnly,
}: CodeFieldProps) => {
const [field, , { setValue, setTouched }] = useField({ name, validate });
const fieldId = getFieldId(name, 'input', idPostfix);
Expand Down Expand Up @@ -61,6 +62,7 @@ const CodeField = ({
setValue(value, true);
}
}}
isReadOnly={isReadOnly}
/>
</FormGroup>
</StackItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const ExpandedManifest = ({ fieldName, manifestIdx }: CustomManifestComponentPro
label="Content"
isRequired
downloadFileName={getDownloadFileName(manifestIdx, value)}
isReadOnly
/>
</GridItem>
</Grid>
Expand Down

0 comments on commit 86a1e16

Please sign in to comment.