0

I am new to react native. For a native base text component Input

<InputGroup rounded style={{width:deviceWidth/2+80,borderColor:'black'}}>
<Input keyboardType='numeric' placeholder='Phone Number' onChangeText={(text) => OrderViewStore.phone=text} value={OrderViewStore.phone}/>
</InputGroup>

i am trying to populate a integer value in value={OrderViewStore.phone}/> it throws error Invalid propvalueof typenumbersupplied toTextInput, expectedstring.

Daniel
  • 53
  • 1
  • 11

1 Answers1

0

You can convert the integer to string.

value={OrderViewStore.phone.toString()}
Ata Mohammadi
  • 3,430
  • 6
  • 41
  • 69