@openmrs/esm-form-engine-lib 3.1.0-pre.1684 → 3.1.0-pre.1691
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -77,10 +77,6 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
|
|
77
77
|
return false;
|
78
78
|
}, [sessionMode, field.readonly, field.inlineRendering, layoutType, workspaceLayout]);
|
79
79
|
|
80
|
-
const label = useMemo(() => {
|
81
|
-
return field.isRequired ? <FieldLabel field={field} /> : <span>{t(field.label)}</span>;
|
82
|
-
}, [field.isRequired, field.label, t]);
|
83
|
-
|
84
80
|
return sessionMode == 'view' || sessionMode == 'embedded-view' ? (
|
85
81
|
<div className={styles.formField}>
|
86
82
|
<FieldValueView
|
@@ -104,7 +100,7 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
|
|
104
100
|
items={selectOptions}
|
105
101
|
initialSelectedItems={initiallySelectedQuestionItems}
|
106
102
|
label={''}
|
107
|
-
titleText={
|
103
|
+
titleText={<FieldLabel field={field} />}
|
108
104
|
itemToString={(item) => (item ? item.label : ' ')}
|
109
105
|
disabled={field.isDisabled}
|
110
106
|
invalid={errors.length > 0}
|
@@ -114,7 +110,10 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
|
|
114
110
|
readOnly={isTrue(field.readonly)}
|
115
111
|
/>
|
116
112
|
) : (
|
117
|
-
<CheckboxGroup
|
113
|
+
<CheckboxGroup
|
114
|
+
name={field.id}
|
115
|
+
legendText={<FieldLabel field={field} />}
|
116
|
+
readOnly={isTrue(field.readonly)}>
|
118
117
|
{field.questionOptions.answers?.map((value, index) => {
|
119
118
|
return (
|
120
119
|
<Checkbox
|