Skip to content

[Help]: loop: true not working when images have variable width #413

Closed Answered by davidjerleke
pReya asked this question in Help
Discussion options

You must be logged in to vote

Hi @pReya,

Thank you for your question. My guess would be that there are no slides when you initialize the Embla script. Try only attaching the emblaRef when you have any slides and pass null when there aren’t any like so:

ref={slides.length > 0 ? emblaRef : null}

Let me know if that’s the culprit or not.

Best,
David

Replies: 2 comments 18 replies

Comment options

You must be logged in to vote
10 replies
@davidjerleke
Comment options

@pReya
Comment options

@pReya
Comment options

@davidjerleke
Comment options

@pReya
Comment options

Answer selected by pReya
Comment options

You must be logged in to vote
8 replies
@pReya
Comment options

@davidjerleke
Comment options

@davidjerleke
Comment options

@pReya
Comment options

@davidjerleke
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
resolved This issue is resolved question Question about how to achieve something
2 participants