question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NestableScrollContainer with NestableDraggableFlatList, VirtualizedLists should never be nested inside plain ScrollViews with the same orientation

See original GitHub issue

I use NestableScrollContainer and NestableDraggableFlatList exactly as in the example, but I get the following scrollview nesting error in console:

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:

<NestableScrollContainer>
  <NestableDraggableFlatList
    scrollEnabled={false}
    data={data1}
    renderItem={renderItem}
    keyExtractor={(index) => `${index}`}
    onDragEnd={({ data }) => setData1(data)}
  />
  <NestableDraggableFlatList
    scrollEnabled={false}
    data={data2}
    renderItem={renderItem}
    keyExtractor={(index) => `${index}`}
    onDragEnd={({ data }) => setData2(data)}
  />
  <NestableDraggableFlatList
    scrollEnabled={false}
    data={data3}
    renderItem={renderItem}
    keyExtractor={(index) => `${index}`}
    onDragEnd={({ data }) => setData3(data)}
  />
</NestableScrollContainer>

Platform & Dependencies

  • react-native-draggable-flatlist version: 3.1.2
  • Platform: iOS/Android
  • React Native: 0.69
  • Reanimated version: 2.8.0
  • React Native Gesture Handler version: 2.2.1

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
goughjo02commented, Sep 5, 2022

try nesting the NestableScrollContainer in a view as in their example https://github.com/computerjazz/react-native-draggable-flatlist/blob/main/Example/screens/NestedScreen.tsx . it got rid of the error for me

1reaction
CaCaBlockercommented, Aug 20, 2022

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

VirtualizedLists should never be nested inside plain ScrollViews
Errors : VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other ...
Read more >
virtualizedlists should never be nested inside plain ... - You.com
VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another ......
Read more >
How to Fix 'VirtualizedLists should never be nested inside ...
VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.
Read more >
react-native-draggable-flatlist - npm
NestableScrollContainer extends the ScrollView from react-native-gesture-handler , and NestableDraggableFlatList extends DraggableFlatList , so ...
Read more >
VirtualizedLists should never be nested inside ... - YouTube
VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList - backed container ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found