-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dot navigation breaks when carousel has less items than set #103
Comments
Also just tested this with Instead of the dot being inactive, it is active, but clickable. Clicking it causes the slides to completely disappear. Clicking the button again does nothing. Looking at where devtools is showing the render happening, it looks like the two slides are off to the left after the click, but don't get brought back. Expected behaviour outlined above (disable/hide dots when not needed) would I think also avoid this. |
[#103] Do not render default dots if only one slide
Resolved by #104 |
It's now in 2.4.1 |
Describe the bug
Dot navigation breaks when carousel contains less items than set in the responsive prop.
To Reproduce
Expected behavior
If there aren't enough items currently visible at a breakpoint to show more than one slide, the dots should either be hidden as navigation/showing the user where they are is unnecessary, or the button should be disabled.
eg.
<button disabled={carouselState.totalItems <= carouselState.slidesToShow}>
Desktop:
The text was updated successfully, but these errors were encountered: