ublo-lib 1.12.25 → 1.12.27
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.
|
@@ -89,12 +89,15 @@ function Inner({
|
|
|
89
89
|
setValid
|
|
90
90
|
}) {
|
|
91
91
|
const {
|
|
92
|
+
icon,
|
|
92
93
|
type,
|
|
93
94
|
className,
|
|
94
95
|
options: fieldOptions = [],
|
|
95
96
|
placeholder,
|
|
96
97
|
required,
|
|
97
|
-
autoSizing
|
|
98
|
+
autoSizing,
|
|
99
|
+
min,
|
|
100
|
+
max
|
|
98
101
|
} = field;
|
|
99
102
|
const [options, setOptions] = React.useState(fieldOptions);
|
|
100
103
|
const fieldClasses = classNames(className, {
|
|
@@ -126,7 +129,7 @@ function Inner({
|
|
|
126
129
|
}
|
|
127
130
|
}));
|
|
128
131
|
}, [name, required, setActivated, setData, setValid, type]);
|
|
129
|
-
const props = getProps(type, name, fieldClasses, data, required, placeholder, autoSizing, onChange);
|
|
132
|
+
const props = getProps(type, name, fieldClasses, data, required, placeholder, autoSizing, onChange, min, max);
|
|
130
133
|
const onBlur = e => {
|
|
131
134
|
const {
|
|
132
135
|
value
|
|
@@ -164,6 +167,7 @@ function Inner({
|
|
|
164
167
|
const isInputValid = required && activated && valid;
|
|
165
168
|
const errorMessage = required && activated && !valid && Messages.get(lang, FIELD_TESTS_ERROR_CODES[type]);
|
|
166
169
|
return _jsx(Tag, {
|
|
170
|
+
icon: icon,
|
|
167
171
|
label: fieldLabel,
|
|
168
172
|
options: options,
|
|
169
173
|
disabled: disabled,
|
|
@@ -189,7 +193,7 @@ function getTag(type) {
|
|
|
189
193
|
return Input;
|
|
190
194
|
}
|
|
191
195
|
}
|
|
192
|
-
function getProps(type, name, className, data, required, placeholder, autoSizing, onChange) {
|
|
196
|
+
function getProps(type, name, className, data, required, placeholder, autoSizing, onChange, min, max) {
|
|
193
197
|
const commonProps = {
|
|
194
198
|
className,
|
|
195
199
|
value: data[name].value,
|
|
@@ -221,6 +225,8 @@ function getProps(type, name, className, data, required, placeholder, autoSizing
|
|
|
221
225
|
return {
|
|
222
226
|
withInput: true,
|
|
223
227
|
onChange,
|
|
228
|
+
min,
|
|
229
|
+
max,
|
|
224
230
|
...commonProps
|
|
225
231
|
};
|
|
226
232
|
}
|