garganurag893 / react-native-phone-number-input

React Native component for phone number.
MIT License
373 stars 216 forks source link

VirtualizedLists causing issues #98

Open pierroo opened 2 years ago

pierroo commented 2 years ago

I have a scrollview wrapper as a parent for the view containing the PhoneInput. Unfortunately this triggers some console errors "VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead."

=> I don't see why, but is the phoneInput wrapped in some kind of scrollview itself? I don't understand why it triggers this error; removing the phoneinput removes the error as well so it does come from the component.

Thank you for your help!

mariomurrent-softwaresolutions commented 2 years ago

The react-native-country-picker-modal dependency uses a ScrollView to display the list of countries, which of course should be scrollable.

So this library would need to change their structure.

pierroo commented 2 years ago

That I understand and I don't mean to change it. However what surprised me, is that I used the props "countryPickerProps={{disableNativeModal: true}}", so at no time will the modal actually open. The modal is never mounted, so I don't understand why the library triggers this error?

manssorr commented 1 year ago

Same here