I'm using floatingLabel
of NativeBase :
<Item floatingLabel>
<Label style={{ color: branco }}>Local da ocorrência</Label>
<Input multiline={true} numberOfLines={4} value={this.state.place.toString()} />
</Item>
This gets the address from the API and is already filled, but if the user tries to edit it can not.
I tried to use defaulValue
, as described in documentation of TextInput
:
Provides an initial value that will change when the user starts typing. Useful for simple use-cases where you do not want to deal with listening to events and updating the value to keep the controlled state in sync.
<Item floatingLabel>
<Label style={{ color: branco }}>Local da ocorrência</Label>
<Input multiline={true} numberOfLines={4} defaultValue={this.state.place.toString()} />
</Item>
But this did not work, it just does not appreciate any value when loading.
Any ideas how I can do this?