touchEnabled={false}
preventing container scrolling via touch on mobile
#440
-
Not sure if this is a bug, or if I'm perhaps missing an option for this. I've got a row of carousels in my project that are wider than my screen. So the whole row can scroll to bring more carousels into view. Because of that, I'd like to disable the built-in touch on the Carousel, so dragging scrolls the container. I've got I've created a repro here: https://codesandbox.io/s/quirky-faraday-dg4m4p?file=/src/Carousel.tsx Is there some additional option I need to enable this behavior? It seems like if |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I found the culprit! It is the following css property set on the slider! Would it be more appropriate for me to override this on my end, or add some sort of conditional override in the library as a PR? I updated the codesandbox link above to include a fix on the consumer-side. Happy to think about a PR for this if the maintainers feel like it'd be appropriate. |
Beta Was this translation helpful? Give feedback.
I found the culprit!
It is the following css property set on the slider!
touch-action: pan y pinch zoom
Would it be more appropriate for me to override this on my end, or add some sort of conditional override in the library as a PR?
I updated the codesandbox link above to include a fix on the consumer-side. Happy to think about a PR for this if the maintainers feel like it'd be appropriate.