Closed ajenkins closed 2 years ago
Thx for contributing! New version is released including the change.
@mrlaessig Doesn't this lose the optimization of a FlatList though? Is there any other solution being worked on that allows us to keep the FlatList under the hood?
@mrlaessig I understand that but I'm wondering if there is a solution in the works to the VirtualizedList error that isn't at the expense of the FlatList. I'm still getting the error with the latest version and I saw a couple other closed issues about it where some said it was fixed, some said it wasn't. This was the only one where I could see a clear solution but it doesn't seem to be optimal so just seeking clarification, wondering if I missed something. Thanks!
This allows you to replace
<FlatList />
with another component. The motivation for this is to allow you to use<Autocomplete />
inside of a<ScrollView />
without getting thatVirtualizedLists should never be nested inside plain ScrollViews
error.Fixes #219
I added unit tests, but I also manually tested using my own app. Here's the relevant part of my code so you can see how this would work in practice: