intelicoreact 0.3.43 → 0.3.44
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.
|
@@ -140,10 +140,7 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
140
140
|
|
|
141
141
|
if (inputValue) {
|
|
142
142
|
inputValue = parseFloat(inputValue);
|
|
143
|
-
|
|
144
|
-
if (min && +min > inputValue) {
|
|
145
|
-
inputValue = min;
|
|
146
|
-
} else if (max && +max < inputValue) inputValue = max;
|
|
143
|
+
if (max && +max < inputValue) inputValue = max;
|
|
147
144
|
}
|
|
148
145
|
|
|
149
146
|
if (symbolsLimit) inputValue = inputValue.toString().substring(0, +symbolsLimit);
|
|
@@ -154,14 +151,14 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
154
151
|
handle.change(min || '');
|
|
155
152
|
},
|
|
156
153
|
focus: function focus(e) {
|
|
157
|
-
if (isFocused) return;
|
|
158
154
|
setIsFocused(true);
|
|
155
|
+
setEditing(true);
|
|
159
156
|
if (onFocus) onFocus(e);
|
|
160
157
|
},
|
|
161
158
|
blur: function blur(e) {
|
|
162
|
-
if (!isFocused) return;
|
|
163
159
|
setIsFocused(false);
|
|
164
160
|
setEditing(false);
|
|
161
|
+
if (inputValue < +min) setInputValue(min);
|
|
165
162
|
if (onBlur) onBlur(e);
|
|
166
163
|
},
|
|
167
164
|
keyDown: function keyDown(e) {
|
|
@@ -270,13 +267,8 @@ var NumericInput = function NumericInput(_ref) {
|
|
|
270
267
|
value: inputValueFormated,
|
|
271
268
|
disabled: disabled,
|
|
272
269
|
onChange: handle.change,
|
|
273
|
-
onFocus:
|
|
274
|
-
|
|
275
|
-
setEditing(true);
|
|
276
|
-
},
|
|
277
|
-
onBlur: function onBlur() {
|
|
278
|
-
return setEditing(false);
|
|
279
|
-
},
|
|
270
|
+
onFocus: handle.focus,
|
|
271
|
+
onBlur: handle.blur,
|
|
280
272
|
onKeyDown: handle.keyDown,
|
|
281
273
|
onKeyUp: handle.keyUp,
|
|
282
274
|
min: min,
|