viclafouch / mui-tel-input

📌 A phone number input designed for MUI (Material ui) V6 built with libphonenumber-js
https://viclafouch.github.io/mui-tel-input
MIT License
158 stars 65 forks source link

disableFormatting prop bugs input value on country change #107

Closed vparusheva closed 6 months ago

vparusheva commented 9 months ago

Version: 4.0.1 Scenario:

  1. Open the code sandbox https://codesandbox.io/s/mui-tel-input-forked-94wqzq
  2. Delete the initial input (+33) and enter something else, such as 2 (so the input shows +2)
  3. Change the country by clicking the flag and selecting another one, e.g. Finland.
  4. The input now shows +358+2 instead of +358.
  5. This does not happen if the disableFormatting prop is not used.