Environment:
OS: macOS 10.14
Node: 10.0.0
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.4 Build version 9F1027a
Android Studio: 3.1 AI-173.4720617
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4
NativeBase Version:
"native-base": "^2.5.1"
Floating Label would float when user is typing
Floating Label floats then unfloats
<Form marginRight={16}>
<Item floatingLabel>
<Label style={{ fontFamily: Fonts.RalewayRegular }}>
Username
</Label>
<Input returnKeyType="next" clearButtonMode="always" autoCapitalize="none" autoCorrect={false} style={{ fontFamily: Fonts.RalewayRegular }} onChangeText={(text) => {
this.handleUsernameInput(text)
}} />
</Item>
<Item floatingLabel>
<Label style={{ fontFamily: Fonts.RalewayRegular }}>
Email
</Label>
<Input returnKeyType="next" clearButtonMode="always" autoCapitalize="none" autoCorrect={false} style={{ fontFamily: Fonts.RalewayRegular }} onChangeText={(text) => {
this.props.dispatch({ type: SIGNUP_EMAIL, email: text })
if (this.props.emailReducer.email != null) {
this.validateEmail(this.props.emailReducer.email)
}
}} />
</Item>
<Item floatingLabel>
<Label style={{ fontFamily: Fonts.RalewayRegular }}>
Password
</Label>
<Input returnKeyType="go" clearButtonMode="always" autoCapitalize="none" autoCorrect={false} secureTextEntry={true} style={{ fontFamily: Fonts.RalewayRegular }} onChangeText={(text) => {
this.props.dispatch({ type: SIGNUP_PASSWORD, password: text })
}} />
</Item>
</Form>

Both
@QinGuan2004 add value props with <Input/>.
Code
import React, { Component } from 'react';
import { Container, Header, Content, Form, Item, Input, Label } from 'native-base';
export default class App extends Component {
state = { username: "", email: "", password: "" }
render() {
return (
<Container>
<Header />
<Content>
<Form>
<Item floatingLabel>
<Label>Username</Label>
<Input
returnKeyType="next"
clearButtonMode="always"
autoCapitalize="none"
autoCorrect={false}
value={this.state.username}
onChangeText={(text) => this.setState({ username: text })} />
</Item>
<Item floatingLabel>
<Label>Email</Label>
<Input
returnKeyType="next"
clearButtonMode="always"
autoCapitalize="none"
autoCorrect={false}
value={this.state.email}
onChangeText={(text) => this.setState({ email: text })} />
</Item>
<Item floatingLabel>
<Label>Password</Label>
<Input
returnKeyType="go"
clearButtonMode="always"
autoCapitalize="none"
autoCorrect={false}
secureTextEntry={true}
value={this.state.password}
onChangeText={(text) => this.setState({ password: text })} />
</Item>
</Form>
</Content>
</Container>
);
}
}
Gif

Worked for me!
@QinGuan2004 This issues will be closed this week in case of no response
works!
Same issue even in "native-base": "2.4.3", how come its worked for some people and closed this issue ?
@Sadanandteggi Two of them shared their issue above, both got the fix for this and also mentioned this
What else could be done here?
I am having the same issue
Most helpful comment
@QinGuan2004 add value props with
<Input/>.Code
Gif