小编Dyl*_*Law的帖子

只读反应原生TextInput

我想在我的RN应用程序中只读文本输入.我试图设置可编辑的道具,但它没有正常工作.我怎样才能做到这一点?

<DetailInput
  inputStyle={styles.inputStyles} 
  height={120}
  width={width - 40}
  multiline={true}
  numberOfLines={6}
  underlineColorAndroid="transparent"
  maxLength={500}
  editable={!userRegistrationInProgress}
  onChangeText={value => this.statementChangedHandler(value)}
/>

const detailInput = props => {

    return (
      <TextInput
        {...props}
        style=
          {[
            props.inputStyle,
            { height: props.height, width: props.width},
            !props.valid && props.touched ? props.invalidInput : null
          ]}
      />
    );
}

export default detailInput;
Run Code Online (Sandbox Code Playgroud)

react-native

2
推荐指数
2
解决办法
6093
查看次数

标签 统计

react-native ×1