jossmac / jossmac/react-images
onClose, Carousel index jumps back to "currentIndex" defined in prop
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
**Steps to reproduce the behavior:**
I'm explicitly defining the `currentIndex` based on state so that when an image is clicked it opens at that index. However, if you navigate to other images from the Modal and then close the Modal it "jumps" the index back to the one set from the state when initially opened, causing a brief image swap while the Modal fades out.
**Expected behavior:**
The index of the Carousel to remain the same onClose
**Actual behavior:**
Index "jumps" onClose, showing wrong image during modal closing animation.

Contributor guide
Assessment
This issue has not been assessed yet.