@pnkx-lib/ui 1.9.477 → 1.9.478
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/es/fields/Input.js
CHANGED
|
@@ -1295,6 +1295,7 @@ const Input = (props) => {
|
|
|
1295
1295
|
subLabel,
|
|
1296
1296
|
classNameSubLabel,
|
|
1297
1297
|
maxValue,
|
|
1298
|
+
minValue,
|
|
1298
1299
|
...restProps
|
|
1299
1300
|
} = props;
|
|
1300
1301
|
const { name, value, onChange, onBlur } = field || {};
|
|
@@ -1363,6 +1364,7 @@ const Input = (props) => {
|
|
|
1363
1364
|
NumericFormatCustom,
|
|
1364
1365
|
{
|
|
1365
1366
|
maxValue,
|
|
1367
|
+
minValue,
|
|
1366
1368
|
name,
|
|
1367
1369
|
ref: inputRef,
|
|
1368
1370
|
type,
|
|
@@ -1448,6 +1450,7 @@ const NumericFormatCustom = forwardRef((props, ref) => {
|
|
|
1448
1450
|
type,
|
|
1449
1451
|
prefix,
|
|
1450
1452
|
helperText,
|
|
1453
|
+
minValue,
|
|
1451
1454
|
maxValue = 999999999999999,
|
|
1452
1455
|
decimalScale,
|
|
1453
1456
|
thousandSeparator,
|
|
@@ -1488,7 +1491,10 @@ const NumericFormatCustom = forwardRef((props, ref) => {
|
|
|
1488
1491
|
prefix: isMoney ? "$" : prefix,
|
|
1489
1492
|
isAllowed: (values) => {
|
|
1490
1493
|
const { floatValue } = values;
|
|
1491
|
-
|
|
1494
|
+
if (floatValue === void 0) return true;
|
|
1495
|
+
if (minValue !== void 0 && floatValue < minValue) return false;
|
|
1496
|
+
if (maxValue !== void 0 && floatValue > maxValue) return false;
|
|
1497
|
+
return true;
|
|
1492
1498
|
},
|
|
1493
1499
|
...restProps
|
|
1494
1500
|
}
|
package/package.json
CHANGED