@asaleh37/ui-base 25.9.15 → 25.9.16-1
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +3 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +1 -0
package/package.json
CHANGED
package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx
CHANGED
|
@@ -58,6 +58,8 @@ const ComboBox: React.FC<ComboBoxProps> = (props) => {
|
|
|
58
58
|
setComboboxData([]);
|
|
59
59
|
},
|
|
60
60
|
});
|
|
61
|
+
} else if (props?.options) {
|
|
62
|
+
setComboboxData(props.options);
|
|
61
63
|
}
|
|
62
64
|
};
|
|
63
65
|
useEffect(() => {
|
|
@@ -75,7 +77,7 @@ const ComboBox: React.FC<ComboBoxProps> = (props) => {
|
|
|
75
77
|
|
|
76
78
|
const { t } = useTranslation();
|
|
77
79
|
const getValue = (v: string) => {
|
|
78
|
-
for (let option of
|
|
80
|
+
for (let option of comboboxData) {
|
|
79
81
|
if (option[props.valueField] == v) {
|
|
80
82
|
return option;
|
|
81
83
|
}
|
|
@@ -11,6 +11,7 @@ const TemplateTextField: React.FC<Omit<TextFieldProps, "outlined">> = (
|
|
|
11
11
|
hidden={true}
|
|
12
12
|
slotProps={{ inputLabel: { shrink: true, sx: { fontWeight: "bold" } } }}
|
|
13
13
|
label={<>{props?.label ? t(props.label) : ""}</>}
|
|
14
|
+
error={props?.error}
|
|
14
15
|
helperText={props?.helperText ? t(props.helperText) : undefined}
|
|
15
16
|
/>
|
|
16
17
|
);
|