Bug - Mantine Carousel after screen resize #6934
filipe-a-rosa-alb
started this conversation in
Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Helo mantine developers and community,
I think i have found a bug on mantine carousel after screen resize.
Im using the latest version of mantine carousel and mantine itself.
This is what's happening:
In this example I have a number of 4 items to show in a 1920px screensize and the number of items passed as props are 4 as well and it displays as it should be with no more pages to scroll because there is no more items to display. After the screen resize the number of items is smaller according to different breakpoints and increases the number of pages to scroll and it resizes automatically showing less number of items . When this happens and i scroll to the next page of slides it slides normally but when I resize back to 1920px it keeps the selected scrollsnap and the carousel simply freezes I have to reload the page in order to render the corrected number of scroll snaps (which is one because in 1920px is set to show 4 items) and carousel is working fine again. I noticed this happens when the number of slides to show is equal to number of items passed as prop. I noticed aswell that after resize of screen the next and previous controls seem to disapear altought if I click in the are it should be it goes to next and previous pages.
Here is the link to codesandbox with an example of this happening:
https://codesandbox.io/p/devbox/c5l2d4?file=%2Fapp%2Fpage.tsx%3A18%2C22
Beta Was this translation helpful? Give feedback.
All reactions