Skip to content

Fix : (FlatList) Address 'Cannot remove child' error on Android #3

@moraj-gloitel

Description

@moraj-gloitel

<Animated.FlatList
ref={listRef}
data={arrData}
keyExtractor={(, index) => index.toString()}
renderItem={renderItem}
style={[styles.rulerContainer, containerStyle]}
contentContainerStyle={styles.rulerContent}
ListHeaderComponent={() => renderSeparator()}
ListFooterComponent={() => renderSeparator(vertical ? height * 0.1 : 0)}
onScroll={scrollHandler}
onMomentumScrollEnd={onMomentumScrollEnd}
snapToOffsets={arrData.map(
(
, index) => index * (stepWidth + gapBetweenSteps)
)}
snapToAlignment="start"
decelerationRate={decelerationRate}
scrollEventThrottle={16}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
horizontal={!vertical}
removeClippedSubviews={false} // Add this prop
/>

Image

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