我想在我的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 ×1