Skip to content

Commit

Permalink
fixes to multiselect readonly after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
pirupius committed Sep 26, 2024
1 parent 63831e3 commit 05dcd6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/inputs/multi-select/multi-select.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
return field.isRequired ? <FieldLabel field={field} /> : <span>{t(field.label)}</span>;
}, [field.isRequired, field.label, t]);

return sessionMode == 'view' || sessionMode == 'embedded-view' ? (
return sessionMode == 'view' || sessionMode == 'embedded-view' || isTrue(field.readonly) ? (
<div className={styles.formField}>
<FieldValueView
label={t(field.label)}
Expand Down Expand Up @@ -110,7 +110,7 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
invalidText={errors[0]?.message}
warn={warnings.length > 0}
warnText={warnings[0]?.message}
readOnly={field.readonly}
readOnly={isTrue(field.readonly)}
/>
) : (
<CheckboxGroup legendText={label} name={field.id} readOnly={isTrue(field.readonly)}>
Expand Down

0 comments on commit 05dcd6d

Please sign in to comment.