You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In React native textinput, event.preventDefault() is not working.I tried in react native textinput to textarea also. cursor still goes to nextline .Is there any way I can prevent this. I want the retur type as "Enter" only and with multiline true. <TextArea
ref={(ref)=>blockRefs.current[block.id]=ref}
key={${block.id}}
style={styles.paragraph}
value={${block.data.text}}
onChangeText={(text)=>handleTextInputChange(text)}
multiline
onKeyPress={(event) => {
event.preventDefault();
if (event.nativeEvent.key === 'Backspace') {
handleBackKeyPress_para(block);
}else if(event.nativeEvent.key==="Enter"){
}
}}
onFocus={()=>onFocusTxtinput(block)}
autoCapitalize='none'
autoCorrect={false}
selectionColor={"white"}
bgColor="white"
/>...in onChangeText , I have added this line. newText=newText.replace(/[\r\n]/g, '');
The text was updated successfully, but these errors were encountered:
In React native textinput, event.preventDefault() is not working.I tried in react native textinput to textarea also. cursor still goes to nextline .Is there any way I can prevent this. I want the retur type as "Enter" only and with multiline true. <TextArea
ref={(ref)=>blockRefs.current[block.id]=ref}
key={${block.id}}
style={styles.paragraph}
value={${block.data.text}}
onChangeText={(text)=>handleTextInputChange(text)}
multiline
onKeyPress={(event) => {
event.preventDefault();
if (event.nativeEvent.key === 'Backspace') {
handleBackKeyPress_para(block);
}else if(event.nativeEvent.key==="Enter"){
The text was updated successfully, but these errors were encountered: