Display: none inactive pages

This commit is contained in:
Dan Abramov
2023-12-12 22:15:41 +00:00
parent 339bfaae2d
commit 6b701d447e
+1 -10
View File
@@ -50,16 +50,7 @@ export const Pager = React.forwardRef(function PagerImpl(
})}
{React.Children.map(children, (child, i) => (
<View
style={
selectedPage === i
? s.flex1
: {
position: 'absolute',
pointerEvents: 'none',
// @ts-ignore web-only
visibility: 'hidden',
}
}
style={selectedPage === i ? s.flex1 : {display: 'none'}}
key={`page-${i}`}>
{child}
</View>