diginet-core-ui 1.4.52-beta.5 → 1.4.52-beta.7

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.
@@ -65,14 +65,15 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
65
65
  style,
66
66
  thousandSeparator,
67
67
  validates,
68
- value: valueProp,
68
+ // value: valueProp,
69
69
  viewType
70
70
  } = props;
71
71
  let max = maxProp;
72
72
  let min = minProp;
73
73
  let thousandSymbol = thousandSeparator;
74
74
  let decimalSymbol = decimalSymbolProp;
75
- let valueProps = valueProp;
75
+ // let valueProps = valueProp;
76
+
76
77
  if (!min && min !== 0) min = -Infinity;
77
78
  if (!max && max !== 0) max = Infinity;
78
79
  const pos = useRef(null);
@@ -120,8 +121,10 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
120
121
  const strVal = String(vl);
121
122
  const isDecimalNum = strVal.indexOf('.') > -1 && (((_strVal$split = strVal.split('.')) === null || _strVal$split === void 0 ? void 0 : _strVal$split[1]) || '').length >= decimalDigit;
122
123
  if (isDecimalNum) {
123
- const replacingVal = vl.replace(thousandSymbol, '');
124
- const val = Number(replacingVal).toFixed(decimalDigit);
124
+ const coreToFixed = (num, precision) => {
125
+ return (+(Math.round(+(num + 'e' + precision)) + 'e' + -precision)).toFixed(precision);
126
+ };
127
+ const val = coreToFixed(Number(vl.replace(thousandSymbol, '')), decimalDigit);
125
128
  number = String(val);
126
129
  }
127
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.4.52-beta.5",
3
+ "version": "1.4.52-beta.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "license": "UNLICENSED",