import React, { PureComponent } from 'react';
import {Text, TextInput, View} from 'react-native';
const App = () => {
return (
<View style={{flex: 1, justifyContent: 'center'}}>
<View>
<Text>Text Input without alignment</Text>
<TextInput style={{padding: 10, margin: 20, borderColor: 'grey', borderWidth: 1}}/>
<Text>Text Input with right alignment</Text>
<TextInput textAlign={'right'} style={{padding: 10, margin: 20, borderColor: 'grey', borderWidth: 1}}/>
</View>
<TextInput/>
</View>);
};
export default App;
在第一个字段中用空格写一些长文本。
将类似的文本写入第二个字段。
未聚焦第二个输入 预期:两个字段的末尾都有省略号 实际:使用textAlign的第二个输入没有省略号。
Android应用以不同的方式工作: 它永远不会显示省略号,但是如果您输入一个长字符串,它将始终显示它的结尾而不是开始。我猜想应该在不专心的时候开始。
反应:16.11.0 => 16.11.0 反应本机:0.62.1 => 0.62.1
我在github上创建了一个问题,但尚未得到任何回应。 https://github.com/facebook/react-native/issues/29068