rili-live / react-native-phone-input

Phone input box for React Native
https://www.npmjs.com/package/react-native-phone-input
MIT License
44 stars 55 forks source link

Placeholder not showing....? #31

Open alexander01202 opened 2 years ago

alexander01202 commented 2 years ago

I just recently started using this library and I can't set a placeholder....

<PhoneInput 
            style={styles.textInput}
            flagStyle={{ marginHorizontal:10 }}
            allowZeroAfterCountryCode={false}
            textStyle={{ letterSpacing:1 }}
            ref={input}
            initialCountry={'us'}
            textProps={{ placeholder:'Please Enter Phone Number' }}
            translation="eng"
          />

This is my code and it doesn't set placeHolder. Is there any fix for this???

chococrypto commented 2 years ago

i have the same error, Someone fix it ?

renishmithani commented 2 years ago

I just recently started using this library and I can't set a placeholder....

<PhoneInput 
             style={styles.textInput}
             flagStyle={{ marginHorizontal:10 }}
             allowZeroAfterCountryCode={false}
             textStyle={{ letterSpacing:1 }}
             ref={input}
             initialCountry={'us'}
             textProps={{ placeholder:'Please Enter Phone Number' }}
             translation="eng"
           />

This is my code and it doesn't set placeHolder. Is there any fix for this???

You have to add this line of code

<PhoneInput style={styles.textInput} flagStyle={{ marginHorizontal:10 }} allowZeroAfterCountryCode={false} textStyle={{ letterSpacing:1 }} ref={input} initialCountry={'us'} textProps={{ placeholder:'Please Enter Phone Number' }} translation="eng" textInputProps={{ placeholderTextColor: 'grey' }} />

zizzle6717 commented 1 year ago

Please make a PR and I will review.

On Tue, Aug 16, 2022, 1:09 PM Diego Ruiz Torres @.***> wrote:

i have the same error, Someone fix it ?

— Reply to this email directly, view it on GitHub https://github.com/rili-live/react-native-phone-input/issues/31#issuecomment-1216979722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXGCEVAYIAEUZ5C3EVNMFDVZPKLZANCNFSM5PNSFTRA . You are receiving this because you are subscribed to this thread.Message ID: @.***>