Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.37k
stars
2.29k
forks
source link
setting zIndex in slideInterpolatedStyle does not work #896
The active item, which can be pinched larger in my case, should be on top of other inactive items,
which span like 5% width at the sides
Actual Behavior
my active item's enlarged view is hidden behind inactive items.
Reproducible Demo
(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)
Is this a bug report, a feature request, or a question?
question
I am trying to have my active item to be on top of every other items and it does not seem to work.
I have tried
ATTEMPT1: interpolating the zIndex with animated value, just like opacity and scale: does not work
ATTEMPT2: sending active index as props and using that: does not work
TEST: just reverting the zIndex: does not work
I'm using iOS which does make use of zIndex. To make sure, I have tested the same with elevation also.
Anyone with insight please help.
` _animatedStyles = (index, animatedValue, carouselProps) => { let animatedOpacity = {}; let animatedScale = {}; let animatedZIndex = {};
}
`
Have you followed the required steps before opening a bug report?
(Check the step you've followed - put an
x
character between the square brackets ([]
).)Have you made sure that it wasn't a React Native bug?
yes since all the other props are working, and zIndex works fine without this library
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
haven't tested on Android with elevation but it's a zIndex issue which is only viable for iOS
Is the bug reproductible in a production environment (not a debug one)?
haven't tested
Environment
Expected Behavior
The active item, which can be pinched larger in my case, should be on top of other inactive items, which span like 5% width at the sides
Actual Behavior
my active item's enlarged view is hidden behind inactive items.
Reproducible Demo
(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)
Steps to Reproduce
can be reproduced by the code above.