Skip to content

Let it work with react-native-bottom-sheetΒ #601

@pingkai

Description

@pingkai

Is your feature request related to a problem? Please describe.
The DraggableFlatList in a BottomSheet can't scroll with the BottomSheet because DraggableFlatList uses FlatList. The BottomSheet provides BottomSheetFlatList to enable it to scroll with the BottomSheet.

Describe the solution you'd like
Add a ListComponent property that can be set using BottomSheetFlatList as the list component.

<GestureHandlerRootView style={styles.container}>
      <BottomSheet ref={sheetRef} snapPoints={snapPoints} index={1}>
        <DraggableFlatList
          data={data}
          renderItem={renderItem}
          keyExtractor={(item, index) => `item-${index}`}
          onDragEnd={({ data }) => setData(data)}
          ListComponent={BottomSheetFlatList} // using BottomSheetFlatList
        />
      </BottomSheet>
</GestureHandlerRootView>

Describe alternatives you've considered
I haven't gotten another solution.

Additional context
I'm not sure if it can work with BottomSheetFlatList.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions