brainhubeu / react-carousel

A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)
https://brainhub.eu/
MIT License
1.07k stars 164 forks source link

Only active dragging until the last item in carousel #526

Closed nabeelvalley closed 4 years ago

nabeelvalley commented 4 years ago

Is your feature request related to a problem? Please describe. It's currently possible to drag past the last element, see below:

image

This results in the user being able to scroll to the empty space to the right. It would be useful to prevent scrolling beyond the last element

Describe the solution you'd like A boolean field to the Carousel that allows you to disable scrolling into the free space

Describe alternatives you've considered I've tried to selectively disable the dragging based on the number of slides per page and the number of available slides but this doesn't really work when using a responsive slider or for a slider that needs to be draggable until a specific point

Additional context None

piotr-s-brainhub commented 4 years ago

@nabeelvalley

Thanks for reporting but it's already reported as https://github.com/brainhubeu/react-carousel/issues/298 so I invite you to like (👍) that issue and I'll close this issue.