@mw-kit/mw-ui 1.7.110 → 1.7.111
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.
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +7 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -12476,9 +12476,13 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
|
|
|
12476
12476
|
var setValue = props.setValue || function () {};
|
|
12477
12477
|
|
|
12478
12478
|
inputProps.onChange = function (event) {
|
|
12479
|
-
var
|
|
12480
|
-
|
|
12481
|
-
event.target.value
|
|
12479
|
+
var masked = mask(event.target.value);
|
|
12480
|
+
|
|
12481
|
+
var _ref = event.target.selectionStart === event.target.selectionEnd && event.target.selectionEnd === event.target.value.length ? [masked.length, masked.length] : [event.target.selectionStart, event.target.selectionEnd],
|
|
12482
|
+
start = _ref[0],
|
|
12483
|
+
end = _ref[1];
|
|
12484
|
+
|
|
12485
|
+
event.target.value = masked;
|
|
12482
12486
|
onChange(event);
|
|
12483
12487
|
setValue(event.target.value);
|
|
12484
12488
|
event.target.setSelectionRange(start, end);
|