Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pirupius committed Sep 30, 2024
1 parent fea4fb8 commit e466776
Show file tree
Hide file tree
Showing 3 changed files with 1,440 additions and 1,188 deletions.
2 changes: 1 addition & 1 deletion src/components/inputs/date/date.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const DateField: React.FC<FormFieldInputProps> = ({ field, value: dateValue, err
[field.datePickerFormat, field.label, t],
);

return sessionMode == 'view' || sessionMode == 'embedded-view' || isTrue(field.readonly) ? (
return sessionMode == 'view' || sessionMode == 'embedded-view' ? (
<FieldValueView
label={t(field.label)}
value={dateValue instanceof Date ? formatDateAsDisplayString(field, dateValue) : dateValue}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
label: answer.label,
key: index,
disabled: answer.disable?.isDisabled,
readonly: isTrue(field.readonly),
}));

const initiallySelectedQuestionItems = useMemo(() => {
Expand Down Expand Up @@ -80,7 +81,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' || isTrue(field.readonly) ? (
return sessionMode == 'view' || sessionMode == 'embedded-view' ? (
<div className={styles.formField}>
<FieldValueView
label={t(field.label)}
Expand Down Expand Up @@ -129,6 +130,7 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
checked={initiallyCheckedQuestionItems.some((item) => item === value.concept)}
onBlur={onblur}
disabled={value.disable?.isDisabled}
readOnly={isTrue(field.readonly)}
/>
);
})}
Expand Down
Loading

0 comments on commit e466776

Please sign in to comment.