Skip to content

[Help]: selectedScrollSnap() doesn't return indexes for some snaps #1023

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

You must be logged in to vote

Hi @Wakinki,

Thanks for your question. In your code, selectedScrollSnap will only update when your component re-renders. What you want to do is the same thing as the dot button file, in one of the examples on the documentation page that has dots. For example, the default example:

  • Generate the sandbox.
  • Open the EmblaCarouselDotButton file.
  • Follow how the selectedIndex is used.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Wakinki
Comment options

Answer selected by Wakinki
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