How can I get nested DraggableFlatList to work?
See original GitHub issueIssue Description
I have an array of objects where each object also contains an array of items.
For example: [ { group1: [{…}] }, { group2: [{…}] }, { group3: [{…}] } ]
I need to be able to sort the groups and also items in the groups. The component works fine when sorting the groups but when I try to drag items, I get this error this._scrollRef.scrollTo is not a function
.
My code is something like this:
<DraggableFlatList data={mainArray} renderItem={() => ( {… <DraggableFlatList data={itemArray} … /> } )} />
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
How to create a drag and drop nested list in React Native
Try the following: import React, { useState, useCallback, Component } from 'react'; import { View, TouchableOpacity, Text, SafeAreaView, ...
Read more >react-native-draggable-flatlist - npm
Nesting DraggableFlatLists. It's possible to render multiple DraggableFlatList components within a single scrollable parent by wrapping one or ...
Read more >React Native TypeScript | Nested Flatlist Tutorial - YouTube
React Native TypeScript | Nested Flatlist Tutorial | Dope Programming ... TypeScript and your loved tech react native. if you like my work...
Read more >React Native Draggable FlatList - Morioh
To use swipeable list items in a DraggableFlatList see React Native Swipeable ... for React Native that allows to create a listview with...
Read more >How to create a drag and drop nested list in React Native ...
... Text, SafeAreaView, ScrollView } from 'react-native'; import DraggableFlatList, { RenderItemParams, } from 'react-native-draggable-flatlist'; ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@wonghupwen Did you get any solution then?
You can use the scrollEnabled field from your parent DraggableFlatList.
To disable scrolling of parent DraggableFlatList while dragging in child DraggableFlatLis