Skip to content

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

@vincicat

Description

@vincicat

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions