react-native-phone-input icon indicating copy to clipboard operation
react-native-phone-input copied to clipboard

Input not displaying dialling code and auto-formatting not working

Open ncuthbert opened this issue 5 years ago • 7 comments

Issue

  • Issue is happening in v0.2.4
  • Text input is blank (no dialling code displayed, only flag)
  • Country is set but dialling code is never displayed in the text field
  • Can enter text but auto-formatting is not working
  • Input will still auto-detect country though
  • Country picker is working and updates flag but still no dialling code

Workaround Downgraded to v0.2.2 and it is working as expected

ncuthbert avatar Nov 04 '19 23:11 ncuthbert

I confirm that downgrading 0.2.2 works. Following commit breaks the autoFormat prop:

https://github.com/thegamenicorus/react-native-phone-input/commit/d05e42260c90a5731309cde37365c68472ceccee

necipallef avatar Nov 13 '19 21:11 necipallef

Do we have to downgrade React-Native too? Mine is RN 0.61.5 and downgraded this package to 0.2.2 (but ^0.2.2) ; however still not working... Ok, checked. It works in 0.2.2 exactly not with ^

Great, Thanks.

mrinal-roy avatar Dec 27 '19 11:12 mrinal-roy

Confirmed this is an issue in 0.2.4. Resolved by running

yarn upgrade [email protected]

This will stop any further updates via yarn (or NPM) and so you should check back on this library for a fix.

GraemeAllanBryce avatar Jan 02 '20 10:01 GraemeAllanBryce

version 0.2.2 really works, thank you

chramos avatar Feb 28 '20 13:02 chramos

Hi , I am usign RN 0.59.10 I downgraded to 0.2.2 and when i select the country , stiil the country code not displaying can someone help me?

Edit -- had to reset cache and works perfectly

schmem55 avatar May 17 '20 09:05 schmem55

it doesn't work if i'm using a custom TextComponent

anmolmalik97 avatar Aug 09 '20 22:08 anmolmalik97

Blocking for me, 0.2.2 uses an outdated google-libphonenumber, which lacks several new metadata updates for phone numbers and therefor fails to parse and validate input.

Edit: temporary fix for me by using npm shrinkwrap and/or yarn resolutions to pinpoint the google-libphonenumber version to the newest one.

MorelSerge avatar Jan 29 '21 09:01 MorelSerge