@mw-kit/mw-ui 1.7.44 → 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 CHANGED
@@ -15205,7 +15205,7 @@ var Component = React__default.forwardRef(function (props, ref) {
15205
15205
 
15206
15206
  var _useState = React.useState(!value ? '' : function () {
15207
15207
  var details = getPhoneDetails(value);
15208
- return details ? details.masked : '';
15208
+ return details ? details.masked : value;
15209
15209
  }),
15210
15210
  inputValue = _useState[0],
15211
15211
  setInputValue = _useState[1];
@@ -15263,7 +15263,7 @@ var Component = React__default.forwardRef(function (props, ref) {
15263
15263
  }, [country]);
15264
15264
  React.useEffect(function () {
15265
15265
  var v = inputValue.replace(/\D+/g, '').substring(0, country.charLimit);
15266
- setValue(country.ddi + " " + v);
15266
+ setValue(v ? country.ddi + " " + v : v);
15267
15267
  }, [inputValue]);
15268
15268
  var placeholder = props.placeholder && props.placeholder[country.iso] ? props.placeholder[country.iso] : country.placeholder;
15269
15269
  return React__default.createElement(RelativeContainer$3, {