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

Country info is not correct. #144

Open rupam71 opened 4 months ago

rupam71 commented 4 months ago

image

At first i was in Bangladesh. My Bangladesh info was correct. And than I select Baharain. Now Baharain info is not correct.

{ "value": "+9731687", "info": { "countryCallingCode": "880", "countryCode": "BH", "nationalNumber": "1687", "numberType": null, "numberValue": "+8801687", "reason": "country" } }

Baharain country code is ok. but Baharain county calling code is not ok.

PolkowskiA commented 2 months ago

I have the same problem. I have noticed that when I use disableFormatting props the MuiTelInputInfo.countryCallingCode does not change - always stays at the current country code, only change of number triggers change of calling code.

viclafouch commented 2 months ago

Hello !

I need a repro with a codesandbox.

rnsnceman commented 1 month ago

https://github.com/user-attachments/assets/12319470-5adc-40f5-b3a7-028370f76920

viclafouch commented 4 days ago

Looks like it's an issue from libphonenumber-js, the lib that handles country for the user input :/