Skip to content
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

slidesToSlide-To accept 0 as truthy value #412

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sathya-sundar
Copy link

We are using react-multi-carousel for our app and we are hit with below limitation / issue.

Given: Some of the slides in our carousel have more than 1 buttons on it.
When: those slides are focused, 1st button get focus.
Then: i press right
Expected: Focus should move to next button on the same slide.
Actual: Focus moving to next slide

I found that if slidesToSlide can be dynamically set to 0 when such slides are focused, i will be able to block the slide transition until the focus is on last button.

In this PR, i have made slidesToSlide to be defaulted to 1, only of responsive.slidesToSlide is undefined, so that 0 is accepted as a truthy value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants