在iOS上反应本机textInputs包装

时间:2018-07-10 13:44:44

标签: react-native

我的本​​机textInputs包装在iOS上。我希望它们不包裹,并隐藏溢出。

代码:

  textInput: {
    flex: 1,
    whiteSpace: 'nowrap',
    overflow: 'hidden',
    textOverflow: 'ellipsis',
    lineHeight: 20,
    flexDirection: 'row',
    width: '100%',
    fontWeight: '200',
    fontSize: 17,
    paddingLeft: 15,
    paddingRight: 15,
    color: '#7c6a4d',
    backgroundColor: '#E9C893'
  },

          <TextInput
            ellipsizeMode="tail"
            numberOfLines={1}
            style={autocompleteStyle.textInput}
            underlineColorAndroid="transparent"
            onChangeText={text => props.onChangeText(text)}
            onContentSizeChange={event => {
              autocompleteInputHeight = getHeight(
                event.nativeEvent.contentSize.height
              )
            }}
            placeholder={props.placeholder}
            placeholderTextColor="#7c6a4d"
            value={props.value}
          />

为什么要换行?它看起来不专业,因为它在包裹时没有垂直对齐

0 个答案:

没有答案
相关问题