我有一个使用React Native编写的屏幕,其中包含单行TextInput:
<ScrollView>
...
<TextInput />
...
</ScrollView>
当我尝试滚动屏幕,而我的初始点击落在TextInput上时,屏幕滚动不起作用。它几乎试图在TextInput内滚动,但没有任何内容可以滚动。这是TextInput的样子:
<TextInput
style={{...styles.rowInput, color: theme.textColor}}
onChangeText={(text) => this.setState({name: text})}
selectTextOnFocus={false}
autoCapitalize="words"
numberOfLines={1}
underlineColorAndroid="transparent"
autoCorrect={false}
placeholder="Enter Your Name"
placeholderTextColor={borderColor}
maxLength={24} />
有什么想法是为什么这种情况会发生?