react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

TextInput right operand of 'in' is not an object

Open nimeshmaharjan1 opened this issue 2 years ago • 7 comments

Current behaviour

Getting this, "Right operand of 'in' is not and object" error after when using the TextInput component from react native paper. If I remove the TextInput component the app works fine. The TextInput from react-native is working though

How to reproduce?

Just a newly created expo project with react native paper and rendering the TextInput component

Preview

image

Your Environment

software version

| react-native | 0.73.2 | react-native-paper | 5.12.1 | expo sdk | 50.0.1 | react | 18.2.0

nimeshmaharjan1 avatar Jan 22 '24 17:01 nimeshmaharjan1

Hey @nimeshmaharjan1 can You share Your TextInput code that causes that error?

AnMiZa avatar Jan 23 '24 10:01 AnMiZa

Hey @nimeshmaharjan1 can You share Your TextInput code that causes that error?

It doesn't highlight the TextInput as an error but if I have the TextInput component then the above error is shown

nimeshmaharjan1 avatar Jan 23 '24 10:01 nimeshmaharjan1

The same Issue TextInput from react native paper not working

harbouli avatar Jan 26 '24 19:01 harbouli

I'm facing the same issues with Searchbar components using Expo SDK 50.0.2

Aztaro97 avatar Jan 27 '24 18:01 Aztaro97

@nimeshmaharjan1 , I was able to fix the problem after following this 👉 solution #756

Aztaro97 avatar Feb 03 '24 22:02 Aztaro97

@Aztaro97 sorry I'm a react native noob - how would you apply the fix? don't we need to wait until react-native-paper update their nativewind dependency?

TAQ2 avatar Mar 11 '24 21:03 TAQ2

Could someone please explain why does this fix work? Even if short-circuiting is used, it would return a false instead of undefined (after the solution). But Does react-native not accept false as a value in style array? Why would it fail?

gyanbhartip avatar May 21 '24 13:05 gyanbhartip