diginet-core-ui 1.4.52-beta.1 → 1.4.52-beta.2

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.
@@ -114,6 +114,15 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
114
114
  selectionStart
115
115
  }
116
116
  } = inputRef;
117
+ if (fixedDecimalDigit && !!decimalDigit) {
118
+ var _strVal$split;
119
+ const strVal = String(vl);
120
+ const isDecimalNum = strVal.indexOf('.') > -1 && (((_strVal$split = strVal.split('.')) === null || _strVal$split === void 0 ? void 0 : _strVal$split[1]) || '').length >= decimalDigit;
121
+ if (isDecimalNum) {
122
+ const val = Number(vl.replace(thousandSymbol, '')).toFixed(decimalDigit);
123
+ number = String(val);
124
+ }
125
+ }
117
126
  let number = convertMoneyToNumber(vl, isNumber);
118
127
 
119
128
  // if (disabledNegative && Number(number || 0) < 0) number = clamp(number, min, max);
@@ -138,15 +147,6 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
138
147
  if (((_number3 = number) === null || _number3 === void 0 ? void 0 : _number3.indexOf(thousandSymbol)) > -1 && selectionStart !== number.length + 1) {
139
148
  pos.current = selectionStart + (number.toString().length - 1 === vl.toString().length ? 1 : 0);
140
149
  }
141
- if (fixedDecimalDigit && !!decimalDigit) {
142
- var _strVal$split;
143
- const strVal = String(vl);
144
- const isDecimalNum = strVal.indexOf('.') > -1 && (((_strVal$split = strVal.split('.')) === null || _strVal$split === void 0 ? void 0 : _strVal$split[1]) || '').length >= decimalDigit;
145
- if (isDecimalNum) {
146
- const val = Number(vl).toFixed(decimalDigit);
147
- number = String(val);
148
- }
149
- }
150
150
  return number;
151
151
  }, [decimalSymbol, max, value, decimalDigit, fixedDecimalDigit]);
152
152
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.4.52-beta.1",
3
+ "version": "1.4.52-beta.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "license": "UNLICENSED",