Skip to content

Dynamic loop && enabled state #365

Closed Answered by davidjerleke
7iomka asked this question in Help
Discussion options

You must be logged in to vote

Hi @7iomka,

Thanks for your question. Before you try this solution you need to ask the Mantine team to bump the embla-carousel-react version to the latest. Because v7.0.0 had a serious bug that was fixed in v7.0.1.

About the solution. I'm not quite sure I'm following but if I understand you correctly, you should be able to set:

const options = {
  slidesToScroll: 'auto' 
}

Read more about how slidesToScroll works here. And make sure to pass the options as demonstrated in the Mantine docs because Mantine adds a layer on top of the raw carousel API.

About the following logic:

when items.length > current slidesPerView - enable loop and show navigation
when items.length <= current slidesPerV…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 7iomka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants