Skip to content

Commit

Permalink
Fix readOnlyVariant
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Cormier <[email protected]>
  • Loading branch information
KevinFCormier committed Sep 17, 2024
1 parent 087b563 commit 389a225
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/AcmDataForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ export function AcmDataFormInput(props: { input: Input; validated?: 'error'; isR
validated={validated}
spellCheck="false"
type={!isSecret || showSecrets ? 'text' : 'password'}
readOnlyVariant="default"
readOnlyVariant={isReadOnly ? 'default' : undefined}
/>
</InputGroupItem>
{value === '' ? (
Expand All @@ -974,7 +974,7 @@ export function AcmDataFormInput(props: { input: Input; validated?: 'error'; isR
validated={validated}
type={'number'}
onChange={(_event, value) => onChange(Number(value))}
readOnlyVariant="default"
readOnlyVariant={isReadOnly ? 'default' : undefined}
/>
</InputGroupItem>
</InputGroup>
Expand All @@ -992,7 +992,7 @@ export function AcmDataFormInput(props: { input: Input; validated?: 'error'; isR
value={'**************'}
validated={validated}
type={'password'}
readOnlyVariant="default"
readOnlyVariant={isReadOnly ? 'default' : undefined}
/>
) : (
<TextArea
Expand All @@ -1002,7 +1002,7 @@ export function AcmDataFormInput(props: { input: Input; validated?: 'error'; isR
spellCheck="false"
resizeOrientation="vertical"
autoResize={true}
readOnlyVariant="default"
readOnlyVariant={isReadOnly ? 'default' : undefined}
/>
)}

Expand Down

0 comments on commit 389a225

Please sign in to comment.