我已经用react-native-phone-number-input
个NPM包插入了基于国家的phoneNumber.但当我点击数字,然后值不会显示在用户界面中所提到的附加屏幕截图.
import React, {useState} from 'react';
import PhoneInput from 'react-native-phone-number-input';
const ComPhoneInput = () => {
const [phoneNumber, setPhoneNumber] = useState('');
const [phoneValue, setPhoneValue] = useState('');
return (
<View style={styles.phoneContainerStyle}>
<PhoneInput
defaultValue={phoneNumber}
defaultCode="BD"
placeholder="01770019346"
onChangeFormattedText={inputValue => {
setPhoneNumber(inputValue);
}}
onChangeText={pValue => {
setPhoneValue(pValue);
}}
containerStyle={styles.phoneMainStyle}
textContainerStyle={styles.phoneTextMainStyle}
textInputStyle={styles.phoneTextStyle}
/>
</View>
);
};
export default ComPhoneInput;
Note:,Here is the ScreenShoot. Please check and if you have an idea, please help me with your valuable guideline. Advanced Thanks..