react: 15.4.2
react-native: 0.42.3
native-base: 2.1.0
When setting "value" on
The floating label is above the
<Item floatingLabel>
<Label>F枚rnamn</Label>
<Input keyboardType='default'
returnKeyType='next'
autoFocus={false}
autoCorrect={false}
multiline={false}
onChange={(event) => {
let text1 = event.nativeEvent.text;
self.setState({textFirst:text1});
}}
value={this.state.textFirst} />
</Item>

Only tested ios
Create a view with a floatingLabel and set a default value.
I got problems
@iambanh2 @fbacker seems to work fine .

@GeekRishabh if you add this to the Input
value={this.state.selected1}
now when running it should have moved 'F枚rnamn' up and written 'key1' in the input. This does not happen :(
i have the same problem. pre-filled inputs with floatingLabel doesn't floatUp the label
+1 I have the same problem
same problem, too
+1 fields falling with value populated when form renders
I'm also using redux-form for managing state. A bit of a pain, looks like NB is managing the state of the label in the Item component and don't check in the constructor if there are values in the component. When you submit and come back to the view with errors or pre-populate the view with input text you lose the internal component state that's holding the text value. I just switched the type on the Item component from using a "floatingLabel" to a "stackedLabel", they look the same when there's text present in the Input.
A little hackish, but needed a fix:
Add a constructor on your component so it's only run on component creation.
constructor(props) {
super(props);
const { input } = props;
this.hasValue = false;
if (input.value !== undefined && input.value.length > 0) {
this.hasValue = true;
}
}
In your render use the hasValue variable to determine which label to render:
render() {
const { input, secureTextEntry, label, meta: { touched, error }, ...custom } = this.props;
<Item
error={hasError}
stackedLabel={this.hasValue}
floatingLabel={!this.hasValue}
>
<Label>{label}</Label>
<Input {...input} {...custom} />
</Item>
}
...
+1 have same problem too.
Same problem here. Works fine on iOS emulator, but when I go to device, doesn't work. :(
I am having the same issue for the version 2.12.1
I am having the same issue for the version 2.13.13
Most helpful comment
+1 fields falling with value populated when form renders