我能否在下面以静态输入的文本输入中的下拉列表形式显示静态消息

问题描述 投票:0回答:1

我需要在输入输入时显示静态消息,或者如果用户专注于本机上的TextInput。

我需要显示输入字段必须包含以下字母。

我如何以浮动方式在框下显示此内容,而不是以本机显示在屏幕视图内?>

<TextInput>
    underlineColorAndroid="transparent"
    secureTextEntry={this.state.passwordDisplayed}
    textContentType="password"
    onChangeText={text => this.setState({ password: text })}
    bluronSubmit={true}
    placeholderTextColor={'grey'}
    placeholder={'Password'}
</TextInput>

我需要在键入输入时显示静态消息,或者如果用户专注于react-native的TextInput。我需要显示输入字段必须包含以下字母。如何显示此内容...

react-native textinput
1个回答
0
投票

React Native的TextInput没有显示任意消息的属性,但是您可以通过创建一个既包含文本输入又包含消息的自定义组件,并通过观察文本输入焦点来控制何时显示消息来做到这一点。

© www.soinside.com 2019 - 2024. All rights reserved.