Skip to content

[v4] | BottomSheetFlatList not supported when newArchEnabled=true #1726

@vijaychouhan-rails

Description

@vijaychouhan-rails

Bug

Environment info

Library Version
@gorhom/bottom-sheet 4.6.0
react-native 0.73.2
react-native-reanimated 3.6.1
react-native-gesture-handler 2.14.0

Steps To Reproduce

  1. Enable newArchEnabled=true
  2. Add BottomSheetFlatList
  3. Then open That bottom sheet and will thrown an error

Unexpected nativeTag: ${refType}; nativeTag=${nativeTag}
createBottomSheetScrollableComponent's ScrollableComponent needs to return
a reference that contains a nativeTag to a Native HostComponent. ref=${ref}

And its throwing from this code

if (!nativeTag || typeof nativeTag !== 'number') {

Describe what you expected to happen:

  1. The error should not get and should work smoothly

Reproducible sample code

<BottomSheet
      ref={whatsappWindowRef}
      snapPoints={snapPoints}
      index={-1}
      enablePanDownToClose={true}
      backdropComponent={renderBackdrop}
      footerComponent={renderFooter}>
      <BottomSheetFlatList
        style={mainStyle.mB80}
        data={filteredData}
        keyExtractor={keyExtractor}
        renderItem={renderItem}
        ListHeaderComponent={title}
        ListEmptyComponent={emptyListComponent}
        ListFooterComponent={<View style={mainStyle.mB80} />}
      />
    </BottomSheet>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions