@mw-kit/mw-ui 1.7.43 → 1.7.45
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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -15200,7 +15200,10 @@ var Component = React__default.forwardRef(function (props, ref) {
|
|
|
15200
15200
|
var value = props.value,
|
|
15201
15201
|
setValue = props.setValue;
|
|
15202
15202
|
|
|
15203
|
-
var _useState = useState('')
|
|
15203
|
+
var _useState = useState(!value ? '' : function () {
|
|
15204
|
+
var details = getPhoneDetails(value);
|
|
15205
|
+
return details ? details.masked : value;
|
|
15206
|
+
}),
|
|
15204
15207
|
inputValue = _useState[0],
|
|
15205
15208
|
setInputValue = _useState[1];
|
|
15206
15209
|
|
|
@@ -15257,7 +15260,7 @@ var Component = React__default.forwardRef(function (props, ref) {
|
|
|
15257
15260
|
}, [country]);
|
|
15258
15261
|
useEffect(function () {
|
|
15259
15262
|
var v = inputValue.replace(/\D+/g, '').substring(0, country.charLimit);
|
|
15260
|
-
setValue(country.ddi + " " + v);
|
|
15263
|
+
setValue(v ? country.ddi + " " + v : v);
|
|
15261
15264
|
}, [inputValue]);
|
|
15262
15265
|
var placeholder = props.placeholder && props.placeholder[country.iso] ? props.placeholder[country.iso] : country.placeholder;
|
|
15263
15266
|
return React__default.createElement(RelativeContainer$3, {
|