@dartech/arsenal-ui 1.4.45 → 1.4.46
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/index.js +6 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -328,6 +328,9 @@ const ControlInput = _a => {
|
|
328
328
|
minRows: textarea ? 3 : 1,
|
329
329
|
value: value !== null && value !== void 0 ? value : '',
|
330
330
|
onChange: customOnChange ? customOnChange : onChange,
|
331
|
+
InputLabelProps: {
|
332
|
+
shrink: !!textFieldProps.placeholder
|
333
|
+
},
|
331
334
|
inputProps: Object.assign(Object.assign({}, (_b = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputProps) !== null && _b !== void 0 ? _b : {}), {
|
332
335
|
value: value !== null && value !== void 0 ? value : ''
|
333
336
|
})
|
@@ -2506,7 +2509,9 @@ const ControlNumberInput = _a => {
|
|
2506
2509
|
rules: {
|
2507
2510
|
required: required ? textError.required : false,
|
2508
2511
|
validate: val => {
|
2509
|
-
if (val === null || val === 0)
|
2512
|
+
if (val === null || val === 0) {
|
2513
|
+
return required ? textError.required : true;
|
2514
|
+
}
|
2510
2515
|
if (decimal && !floatsOnly.test(val) || /^-*0+$/.test(val)) {
|
2511
2516
|
return textError.notValidNumber;
|
2512
2517
|
} else if (!decimal && !digitsOnly.test(val)) {
|