@asaleh37/ui-base 25.9.5-1 → 25.9.5-2
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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +3 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +1 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +1 -1
package/package.json
CHANGED
|
@@ -50,7 +50,6 @@ const FormElementField: React.FC<FormElementFieldProps> = (
|
|
|
50
50
|
fullWidth
|
|
51
51
|
type={fieldType}
|
|
52
52
|
disabled={element.disabledFields.includes(fieldName)}
|
|
53
|
-
hidden={element.hiddenFields.includes(fieldName)}
|
|
54
53
|
label={getFieldLabel()}
|
|
55
54
|
value={formValues[fieldName]}
|
|
56
55
|
onChange={(event) => {
|
|
@@ -81,6 +80,9 @@ const FormElementField: React.FC<FormElementFieldProps> = (
|
|
|
81
80
|
height: "100% !important", // forces full height usage
|
|
82
81
|
},
|
|
83
82
|
...props?.formProps?.style,
|
|
83
|
+
display: element.hiddenFields.includes(fieldName)
|
|
84
|
+
? "none"
|
|
85
|
+
: undefined,
|
|
84
86
|
}}
|
|
85
87
|
error={formManager.formState.errors[fieldName] != undefined}
|
|
86
88
|
helperText={formManager?.formState?.errors[
|
|
@@ -8,6 +8,7 @@ const TemplateTextField: React.FC<Omit<TextFieldProps, "outlined">> = (
|
|
|
8
8
|
return (
|
|
9
9
|
<TextField
|
|
10
10
|
{...props}
|
|
11
|
+
hidden={true}
|
|
11
12
|
slotProps={{ inputLabel: { shrink: true, sx: { fontWeight: "bold" } } }}
|
|
12
13
|
label={<>{props?.label ? t(props.label) : ""}</>}
|
|
13
14
|
helperText={props?.helperText ? t(props.helperText) : undefined}
|
|
@@ -45,7 +45,7 @@ const TemplateForm: React.FC<TemplateFormProps> = (
|
|
|
45
45
|
const [attachmentPanelEnabledForRecord, setAttachmentPanelEnabledForRecord] =
|
|
46
46
|
useState<boolean>(true);
|
|
47
47
|
const { t } = useTranslation();
|
|
48
|
-
const fields = getAllFields(props.elements);
|
|
48
|
+
const fields = getAllFields(props.elements);
|
|
49
49
|
const initiallyHiddenFields = [];
|
|
50
50
|
const initiallyDisabledFields = [];
|
|
51
51
|
for (const field of fields) {
|