Replies: 1 comment 5 replies
-
Hi @andyford, This won't answer your question, but is there a state where the on-page carousel and the lightbox carousel are visible at the same time? Best, |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to have an on-page carousel that launches a larger version of the carousel inside a lightbox when a slide is clicked.
For this, I have one main carousel and a lightbox carousel. I create both the refs and can display both of the carousels on the page simultaneously. And they both control each other (very similar to the thumbnail example https://www.embla-carousel.com/examples/predefined/#thumbnails)
I run into problems when I try to put the lightbox version inside of a react Portal:
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
I thought this was perhaps a limitation of React refs and portals but I confirmed that regular react refs can be sent into portals.
So has anyone managed to create an embla ref then send it into a portal?
Beta Was this translation helpful? Give feedback.
All reactions