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

BottomSheet should allow users to decide their ScrollView Component instead of a hardcoded ScrollView

Open vincicat opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please Describe.

I would like to using FlatList inside RNE BottomSheet (I have to display a long list in that BottomSheet), but I get this error after putting the FlatList inside BottomSheet:

ERROR 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.

this error is not fatal but may cause issues if user trying to have a complex FlatList

Describe the solution you'd like

The error occurs as BottomSheet already has a ScrollView on top of children in BottomSheet.tsx#L73

Since FlatList is a kind of ScrollView and RN doesn't prefer a ScrollView wrapped inside another ScrollView, we will get the error message above.

Either allow users to define their ScrollView inside children or their ScrollViewComponent in that line will solve the problem

Describe alternatives you've considered

Additional context I am using RNE 4.0.0-rc7

vincicat avatar Feb 22 '23 16:02 vincicat