gluestack / gluestack-ui

React & React Native Components & Patterns (copy-paste components & patterns crafted with Tailwind CSS (NativeWind))
https://gluestack.io/
MIT License
2.85k stars 121 forks source link

React native Text area is not working as expected with event.preventDefault #2087

Open AmmuRamasubramanian opened 7 months ago

AmmuRamasubramanian commented 7 months ago

Description

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.

CodeSandbox/Snack link

No response

Steps to reproduce

  1. I want to restrict the enter button to perform its action .But I want the enter button since I am using multiline text
  2. I tried to add condition in onChangeText also. But the cursor goes down and then comes back
  3. This is happening in react native Textinput also.

gluestack-ui Version

3.3.1

Platform

Other Platform

Nil

Additional Information

https://github.com/gluestack/gluestack-ui/assets/93109946/8bf32d80-e108-4ad7-9044-6298e6e60fc4

Viraj-10 commented 7 months ago

Hey @AmmuRamasubramanian, Can you provide a repo or snack with this?