Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Country code disappear on input #110

Open
JordanProtin opened this issue Jul 10, 2019 · 12 comments
Open

Country code disappear on input #110

JordanProtin opened this issue Jul 10, 2019 · 12 comments

Comments

@JordanProtin
Copy link

JordanProtin commented Jul 10, 2019

From few days ago, country code doesn't appear on phone input :

Capture d’écran 2019-07-10 à 11 14 10

Is this bug in relation with the new release ?

My package.json contains "react-native-phone-input": "^0.2.1"

EDIT : reproduce code

selectCountry = (country) => {
  this.phone.selectCountry(country.iso2);
}
<PhoneInput
  ref={ref => { this.phone = ref }}
  onPressFlag={this.onPressFlag}
  countriesList={Countries}
  textStyle={{ color: 'black' }}
  initialCountry='fr'
  value={value}
  onChangePhoneNumber={this.handleOnChangePhoneNumber}
  textProps={{
    returnKeyType: returnKeyType,
    keyboardType: "numbers-and-punctuation",
    onSubmitEditing: onSubmitEditing,
    blurOnSubmit: blurOnSubmit
  }}
/>
<ModalCountrySelector
  ref={ref => { this.myCountryPicker = ref }}
  data={pickerData}
  onChange={country => { this.selectCountry(country) }}
  cancelText={ I18n.t('actions.cancel') }
  pickerButtonColor='red'
/>
@mateattilabarna
Copy link

Hi,

This bug is also observed with the version 0.2.4, using the Custom Library Picker example from the Readme: https://github.com/thegamenicorus/react-native-phone-input/blob/master/examples/CustomLibraryPicker/app.js

@mohmdalfaha
Copy link

mohmdalfaha commented Jul 15, 2019

I was having the same issue with version 0.2.4, so I have downgraded to the most recent stable version which is 0.2.2. In your case @JordanProtin , I think the issue is related to textProps.

@simonasdev
Copy link

I think it is after merge of #102 where a new state variable was introduced and passed to to TextInput value prop, although it is not being set correctly

@affanhashone
Copy link

@mohmdalfaha its not appearing on 0.2.2 also

@simonasdev
Copy link

it is appearing on 0.2.2. Commit fc938a6

@affanhashone
Copy link

@simonasdev I checked on this, country code not appearing on this

@affanhashone
Copy link

@simonasdev I reset my cache, its appearing

@ziaulrehman40
Copy link

We also downgraded to 0.2.2 because of this inconsistency.

@Abdulrahman-Khalid
Copy link

I'm using the example model, I downgraded to 0.2.2 and reset the cache but still not working for me

@affanhashone
Copy link

Remove the module then reinstall it again

@Abdulrahman-Khalid
Copy link

@affanhashone It worked, Thanks

@zgajo
Copy link

zgajo commented Sep 5, 2019

After downgrade to 0.2.2 , run npm start -- --reset-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants