如何设置Input
组件的react-native-ui-kitten
样式以使其显示多行(当没有输入值时)?
问题:尝试将multiline
andnumberOfLines
道具传递给<Input />
. 这样做只会增加行数。当没有用户输入时,它仍然显示一行。
import { Input, withStyles } from 'react-native-ui-kitten';
<Input
label='Message'
placeholder='Enter your long message..'
multiline={true}
numberOfLines={5}
style={[themedStyle.input, {}]}
textStyle={themedStyle.inputText}
labelStyle={themedStyle.inputLabel}
/>
当前行为
预期行为: Input
组件应显示 5 行没有任何输入值。
在 React Native v0.57.1、expo v2.21.2 和 iOS 12.2 上的物理 iPhone 上运行