react-native-virtualized-view icon indicating copy to clipboard operation
react-native-virtualized-view copied to clipboard

Issue with textInput

Open wHat0 opened this issue 3 years ago • 10 comments

<ScrollView automaticallyAdjustContentInsets={true} keyboardShouldPersistTaps="handled" keyboardDismissMode="none"> <TextInput placeholder="Comments" multiline={true} value={TextValue} onChangeText={value => setTextValue(value)} /> </ScrollView>

inside ScrollView is not working it just get closed on every tap on the keyboard i have tried different approaches but failed to get the inputs... automaticallyAdjustContentInsets={true} keyboardShouldPersistTaps="handled" keyboardDismissMode="none"

wHat0 avatar Sep 07 '22 08:09 wHat0

and I came to know that this error is occuring due to state updating in onchangetext in your scrollview kindly provide any solution or alternate for it....

wHat0 avatar Sep 07 '22 09:09 wHat0

hi @wHat0 , Can you create a Repo for me to debug to support for you?

hoaphantn7604 avatar Sep 08 '22 02:09 hoaphantn7604

Hey Hope you are doing great. Here is the Repo for you. [https://github.com/wHat0/StateInNestedScrollView]

wHat0 avatar Sep 08 '22 10:09 wHat0

https://github.com/wHat0/StateInNestedScrollView

wHat0 avatar Sep 08 '22 10:09 wHat0

Hello, facing the same issue, did you find any solution ? @hoaphantn7604 any suggestions ?

Thanks.

dioseb avatar Dec 01 '22 12:12 dioseb

Got it working, ListHeaderComponent={xxx} instead of ListHeaderComponent={() => <>{xxx}} do the trick for me

dioseb avatar Dec 02 '22 13:12 dioseb

i am facing the same issue anyone have any solution ?

indresh149 avatar Feb 25 '23 06:02 indresh149

Yes their are two solution

  • 1st one is instead of using onChangeText={(value) => setTextValue(value)} use onChangeText={ setTextValue}

  • Other is to make a separate component of TextInput with its view and get the value from their.

wHat0 avatar Mar 01 '23 12:03 wHat0

i am facing the same issue anyone have any solution ?

Yes their are two solution

1st one is instead of
using onChangeText={(value) => setTextValue(value)}
use onChangeText={ setTextValue}

Other is to make a separate component of TextInput with its view and get the value from their.

wHat0 avatar Mar 01 '23 12:03 wHat0

i am facing the same issue anyone have any solution ?

Yes their are two solution

1st one is instead of
using onChangeText={(value) => setTextValue(value)}
use onChangeText={ setTextValue}

Other is to make a separate component of TextInput with its view and get the value from their.

I am facing this issue as well, could you be more specific on how you solved it? Thanks in advance

MULLERGuilherme avatar Mar 14 '23 13:03 MULLERGuilherme