intelicoreact 1.0.16 → 1.0.18
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.
|
@@ -285,7 +285,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
285
285
|
|
|
286
286
|
var sw = lc.getElementsByClassName('dropdown__list')[0];
|
|
287
287
|
var swHeight = sw === null || sw === void 0 ? void 0 : (_sw$getBoundingClient = sw.getBoundingClientRect()) === null || _sw$getBoundingClient === void 0 ? void 0 : _sw$getBoundingClient.height;
|
|
288
|
-
lc.style.
|
|
288
|
+
lc.style.minWidth = "".concat(width, "px");
|
|
289
289
|
lc.style.left = "".concat(left, "px");
|
|
290
290
|
lc.style.top = "".concat(windowHeight - top - height >= swHeight ? top + height : top - swHeight, "px");
|
|
291
291
|
lc.style.maxHeight = "".concat(swHeight, "px");
|
|
@@ -407,7 +407,6 @@ function InputMask2() {
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
setValue(value);
|
|
410
|
-
onChangeProp(value);
|
|
411
410
|
|
|
412
411
|
if (blinkErrors) {
|
|
413
412
|
setTimeout(function () {
|
|
@@ -520,7 +519,7 @@ function InputMask2() {
|
|
|
520
519
|
setMaskRendered(true);
|
|
521
520
|
}, [maskPattern]);
|
|
522
521
|
(0, _react.useEffect)(function () {
|
|
523
|
-
if (isMaskRendered && !isInitValue ||
|
|
522
|
+
if (isMaskRendered && !isInitValue || isInitValue && ![getInputValue(), getClearInnerValueAsString()].includes(value) && value !== '') {
|
|
524
523
|
setValue(value);
|
|
525
524
|
setIsInitValue(true);
|
|
526
525
|
}
|
|
@@ -533,7 +532,7 @@ function InputMask2() {
|
|
|
533
532
|
}, [isFocusedDefault, isMaskRendered]); // OnChange Observer
|
|
534
533
|
|
|
535
534
|
(0, _react.useEffect)(function () {
|
|
536
|
-
if (isMaskRendered && isInitValue
|
|
535
|
+
if (isMaskRendered && isInitValue) {
|
|
537
536
|
var _prevValueRef$current, _prevValueRef$current2;
|
|
538
537
|
|
|
539
538
|
setError(false);
|
|
@@ -541,9 +540,8 @@ function InputMask2() {
|
|
|
541
540
|
if (returnMaskedValue) values.reverse();
|
|
542
541
|
|
|
543
542
|
if ((prevValueRef === null || prevValueRef === void 0 ? void 0 : (_prevValueRef$current = prevValueRef.current) === null || _prevValueRef$current === void 0 ? void 0 : _prevValueRef$current[0]) !== values[0] && (prevValueRef === null || prevValueRef === void 0 ? void 0 : (_prevValueRef$current2 = prevValueRef.current) === null || _prevValueRef$current2 === void 0 ? void 0 : _prevValueRef$current2[1]) !== values[1] && value !== values[0] && value !== values[1]) {
|
|
544
|
-
prevValueRef.current = values;
|
|
545
|
-
|
|
546
|
-
if (values[0] !== '') onChangeProp.apply(void 0, values);
|
|
543
|
+
prevValueRef.current = values;
|
|
544
|
+
onChangeProp.apply(void 0, values);
|
|
547
545
|
}
|
|
548
546
|
}
|
|
549
547
|
}, [innerValue, isMaskRendered, isInitValue, value]); // Blink Error
|