Country prefix missing when value set to empty string
Criezc opened this issue · comments
Criez's commented
Hi, currently I'm using your libraries as phone number input. But I encountered an issues where if I click the reset button which resetting the value of sender
into an empty string. It forces the country prefix (+62) into null. Only leaving the flag it self
this is my code
<InputPhone
label="Sender Number"
value={sender}
onChange={setSender}
country="id"
onlyCountries={['id']}
/>
for the examples after I set my sender state into empty string
Criez's commented
issues resolved by setting setState into ('+62')