Display: none inactive pages
This commit is contained in:
@@ -50,16 +50,7 @@ export const Pager = React.forwardRef(function PagerImpl(
|
|||||||
})}
|
})}
|
||||||
{React.Children.map(children, (child, i) => (
|
{React.Children.map(children, (child, i) => (
|
||||||
<View
|
<View
|
||||||
style={
|
style={selectedPage === i ? s.flex1 : {display: 'none'}}
|
||||||
selectedPage === i
|
|
||||||
? s.flex1
|
|
||||||
: {
|
|
||||||
position: 'absolute',
|
|
||||||
pointerEvents: 'none',
|
|
||||||
// @ts-ignore web-only
|
|
||||||
visibility: 'hidden',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
key={`page-${i}`}>
|
key={`page-${i}`}>
|
||||||
{child}
|
{child}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user