0
I’m using the 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 receives the address from the API and is already filled in, but if the user tries to edit it cannot.
I tried to use the defaulValue
which, 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 prop 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 one didn’t work, it just doesn’t show any value when loading.
Any idea how I can do this?