x3388638 / react-grid-carousel

React responsive carousel component w/ grid layout
https://react-grid-carousel.now.sh
MIT License
128 stars 28 forks source link

Carousel gets back to first page if clicked on image #17

Open Rop89 opened 2 years ago

Rop89 commented 2 years ago

I have a React Grid Carousel with 3 images per page, they are 6 in total, which is 2 carousel pages. If I click the image (it's prompting a modal), it gets back to the first carousel page.

How can I make sure that if the image in the modal is clicked it doesn't force a "reset" of the carousel pages?

EKivutha commented 1 year ago

carousel pages are rest once state and ref are reset, for example when you refresh the page, make sure that the state is maintained. What are you using for state management?