当组件失去焦点时,我很难将TextInput配置为始终从头显示输入值。
我有这个:
我想要这个:
这是我的组件:
export function TextInputField(props: TextInputFieldProps): React.JSX.Element {
return (
<View style={{...ModalStyles.inputContainer, width: props.width}}>
<Text style={ModalStyles.inputLabel}>{props.text}</Text>
<View style={getTextInputStyle(props)}>
<TextInput style={ModalStyles.textInputField}/>
</View>
</View>
)
}
我正在安卓系统中测试。
我试着设置
selection
如这里所建议的:
How do I make a TextInput show the start of the entered text instead of the end in Android?
,但没有成功。