【发布时间】:2018-02-25 11:42:57
【问题描述】:
我想知道当用户单击字段以填充它时如何清除 TextInput 中的“占位符”。
这是我的文本输入:
<TextInput
style={{height:40, borderColor: 'gray', borderWidth:1}}
onChangeText={(text) => this.setStoreName(text)}
value={this.state.storeName}
/>
还有我的构造函数:
constructor(props) {
super(props)
this.state = {
name: "Votre nom",
storeName: "Le nom de votre commerce",
email: "Votre email",
address: "L'adresse de votre commerce",
city: "Votre ville",
category: "Categorie",
password: "Votre mot de passe"
}
}
提前谢谢你。
【问题讨论】: