trithuc-mvc-react 2.4.1 → 2.4.3
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.
|
@@ -84,12 +84,36 @@ function FormField({
|
|
|
84
84
|
fullWidth
|
|
85
85
|
placeholder={label}
|
|
86
86
|
size={size}
|
|
87
|
+
{...rest}
|
|
87
88
|
/>
|
|
88
89
|
);
|
|
89
90
|
}}
|
|
90
91
|
/>
|
|
91
92
|
);
|
|
92
93
|
case "text":
|
|
94
|
+
case "color":
|
|
95
|
+
return (
|
|
96
|
+
<Controller
|
|
97
|
+
name={name}
|
|
98
|
+
control={control}
|
|
99
|
+
render={({ field, fieldState: { error } }) => {
|
|
100
|
+
return (
|
|
101
|
+
<TextField
|
|
102
|
+
{...field}
|
|
103
|
+
type={type}
|
|
104
|
+
label={label + (required ? "*" : "")}
|
|
105
|
+
error={Boolean(error)}
|
|
106
|
+
helperText={error?.message}
|
|
107
|
+
fullWidth
|
|
108
|
+
placeholder={label}
|
|
109
|
+
disabled={disabled}
|
|
110
|
+
size={size}
|
|
111
|
+
{...rest}
|
|
112
|
+
/>
|
|
113
|
+
);
|
|
114
|
+
}}
|
|
115
|
+
/>
|
|
116
|
+
);
|
|
93
117
|
case "number":
|
|
94
118
|
return (
|
|
95
119
|
<Controller
|
|
@@ -107,6 +131,7 @@ function FormField({
|
|
|
107
131
|
placeholder={label}
|
|
108
132
|
disabled={disabled}
|
|
109
133
|
size={size}
|
|
134
|
+
{...rest}
|
|
110
135
|
/>
|
|
111
136
|
);
|
|
112
137
|
}}
|
|
@@ -297,6 +322,7 @@ function FormField({
|
|
|
297
322
|
actions: ["clear"]
|
|
298
323
|
}
|
|
299
324
|
}}
|
|
325
|
+
{...rest}
|
|
300
326
|
/>
|
|
301
327
|
);
|
|
302
328
|
}}
|
|
@@ -323,6 +349,7 @@ function FormField({
|
|
|
323
349
|
display: "none"
|
|
324
350
|
}
|
|
325
351
|
}}
|
|
352
|
+
{...rest}
|
|
326
353
|
/>
|
|
327
354
|
);
|
|
328
355
|
}}
|
|
@@ -26,7 +26,7 @@ DataManagement.propTypes = {
|
|
|
26
26
|
field: PropTypes.string,
|
|
27
27
|
label: PropTypes.string,
|
|
28
28
|
placeHolder: PropTypes.string,
|
|
29
|
-
type: PropTypes.oneOf(["text", "number", "date", "autocomplete", "checkbox", "radio", "switch"]),
|
|
29
|
+
type: PropTypes.oneOf(["text", "color", "number", "date", "autocomplete", "checkbox", "radio", "switch"]),
|
|
30
30
|
onChangeAfter: PropTypes.func,
|
|
31
31
|
filters: PropTypes.array
|
|
32
32
|
})
|