intelicoreact 1.1.90 → 1.1.92

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.
@@ -79,6 +79,8 @@ var NumericInput = function NumericInput(_ref) {
79
79
  isUseAutoSelect = _ref$isUseAutoSelect === void 0 ? true : _ref$isUseAutoSelect,
80
80
  _ref$isLoading = _ref.isLoading,
81
81
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
82
+ _ref$isAllowNullValue = _ref.isAllowNullValue,
83
+ isAllowNullValue = _ref$isAllowNullValue === void 0 ? false : _ref$isAllowNullValue,
82
84
  _ref$onlyNumbers = _ref.onlyNumbers,
83
85
  onlyNumbers = _ref$onlyNumbers === void 0 ? {
84
86
  type: 'int'
@@ -90,7 +92,9 @@ var NumericInput = function NumericInput(_ref) {
90
92
  var incRef = (0, _react.useRef)(null);
91
93
  var wrapRef = (0, _react.useRef)(null); // STATES
92
94
 
93
- var _useState = (0, _react.useState)(value || min || ''),
95
+ var initialMin = isAllowNullValue ? '' : min;
96
+
97
+ var _useState = (0, _react.useState)(value || initialMin),
94
98
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
95
99
  inputValue = _useState2[0],
96
100
  setInputValue = _useState2[1];
@@ -120,7 +124,7 @@ var NumericInput = function NumericInput(_ref) {
120
124
  isToHighlightError = _useState12[0],
121
125
  setIsToHighlightError = _useState12[1];
122
126
 
123
- var _useState13 = (0, _react.useState)(value || min || ''),
127
+ var _useState13 = (0, _react.useState)(value || initialMin),
124
128
  _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
125
129
  prevValue = _useState14[0],
126
130
  setPreviousValue = _useState14[1];
@@ -289,7 +289,7 @@ var filterFloat = function filterFloat(inputValue) {
289
289
  return replacer(previousValue);
290
290
  }
291
291
 
292
- if (Number(output)) {
292
+ if (output.includes('.') && output[output.indexOf('.') + 3] !== undefined && Number(output)) {
293
293
  output = Number(output).toFixed(decimalPlaces);
294
294
  }
295
295
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.1.90",
3
+ "version": "1.1.92",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [