diginet-core-ui 1.4.52-beta.4 → 1.4.52-beta.5
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.
|
@@ -316,19 +316,20 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
|
316
316
|
setError(errorProp);
|
|
317
317
|
}
|
|
318
318
|
}, [value]);
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}, [valueProps, decimalDigit]);
|
|
319
|
+
|
|
320
|
+
// useEffect(() => {
|
|
321
|
+
// // if (typeof valueProps !== 'undefined')
|
|
322
|
+
// // if (disabledNegative && Number(valueProps || 0) < 0) {
|
|
323
|
+
// if (!isNaN(valueProps) || !isNaN(value)) {
|
|
324
|
+
// if (min === 0 && Number(valueProps || 0) < 0) {
|
|
325
|
+
// // nếu không cho nhập số âm mà value đầu vào là âm thì reset value về 0
|
|
326
|
+
// valueProps = clamp(0, min, max);
|
|
327
|
+
// }
|
|
328
|
+
// // setValue(parseNumberToMoney(valueProps?.toString().replace(regexValidNumber, ''), true));
|
|
329
|
+
// // setValue(parseNumberToMoney(valueProps?.toString().replace(regexValidNumber, ''), true));
|
|
330
|
+
// }
|
|
331
|
+
// }, [valueProps, decimalDigit]);
|
|
332
|
+
|
|
332
333
|
useEffect(() => {
|
|
333
334
|
setError(errorProp);
|
|
334
335
|
}, [errorProp]);
|
|
@@ -394,7 +395,7 @@ const NumberInputRootCSS = ({
|
|
|
394
395
|
}
|
|
395
396
|
`;
|
|
396
397
|
NumberInput.defaultProps = {
|
|
397
|
-
delayOnChange:
|
|
398
|
+
delayOnChange: 500
|
|
398
399
|
// autoFocus: false,
|
|
399
400
|
// className: '',
|
|
400
401
|
// decimalDigit: Infinity,
|