@dartech/arsenal-ui 1.4.45 → 1.4.47
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +8 -2
- 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,10 @@ const ControlNumberInput = _a => {
|
|
2506
2509
|
rules: {
|
2507
2510
|
required: required ? textError.required : false,
|
2508
2511
|
validate: val => {
|
2509
|
-
if (val ===
|
2512
|
+
if (+val === 0) return true;
|
2513
|
+
if (val === null) {
|
2514
|
+
return required ? textError.required : true;
|
2515
|
+
}
|
2510
2516
|
if (decimal && !floatsOnly.test(val) || /^-*0+$/.test(val)) {
|
2511
2517
|
return textError.notValidNumber;
|
2512
2518
|
} else if (!decimal && !digitsOnly.test(val)) {
|
@@ -6823,7 +6829,7 @@ const PropertyFiller = ({
|
|
6823
6829
|
parseValue: true,
|
6824
6830
|
hideErrorMessage: true,
|
6825
6831
|
useCleanValue: true,
|
6826
|
-
mode: propertyType === PropertyType.ANY ? 'text' : 'json'
|
6832
|
+
mode: propertyType === PropertyType.ANY || propertyType === PropertyType.JSON ? 'text' : 'json'
|
6827
6833
|
}) : jsx(ControlInput, {
|
6828
6834
|
control: control,
|
6829
6835
|
name: name,
|