Add content-visibility for rows

This commit is contained in:
Dan Abramov
2023-12-08 00:11:07 +00:00
parent 4112b02cd5
commit 86ed4b8f6a
+9 -1
View File
@@ -169,7 +169,11 @@ let Row = function RowImpl<ItemT>({
if (!renderItem) {
return null
}
return renderItem({item, index, separators: null as any})
return (
<View style={styles.row}>
{renderItem({item, index, separators: null as any})}
</View>
)
}
Row = React.memo(Row)
@@ -250,4 +254,8 @@ const styles = StyleSheet.create({
marginLeft: 'auto',
marginRight: 'auto',
},
row: {
// @ts-ignore web
contentVisibility: 'auto',
},
})