oblador / react-native-collapsible

Animated collapsible component for React Native, good for accordions, toggles etc
MIT License
2.42k stars 455 forks source link

Accordion inside ScrollView results in `VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality` #461

Open hanselsen opened 1 year ago

hanselsen commented 1 year ago

It is very easy. When I insert the Accordion element inside a scrollview (because I wish to manage what happens at the RefreshControl), I get this warning in my LogCat.

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.

My code is like this:

...
<ScrollView refreshControl={...}>
    <SomeHeading/> 
    <Accordion {...} />
</ScrollView>
...

Is there an (un)documented trick for this?

hanselsen commented 5 months ago

@oblador I am still very happy with the functionality, but I thought I jumped back to this. Should the property renderAsFlatList be applicable? Because this is not working.