Currently the hook tries to detect the gesture in both directions, which causes the issues with the carousels that need to be swiped only left to right/right to left.
orientation prop on the options object that is being passed to usePageGesture hook should prevent detection of the orientation that is not specified. I.e. if horizontal is specified only that direction should be detected.
Actual Result
It looks like usePageGesture hook already accepts an options object with orientation prop on it, but it doesn't seem to have any affect at the moment.
Description
Currently the hook tries to detect the gesture in both directions, which causes the issues with the carousels that need to be swiped only left to right/right to left.
Steps to Reproduce
Can be replicated here: https://hz-core.netlify.com/use-page-gesture#example Or here: https://2u.netlify.com/components/carousel
Expected Result
orientation
prop on the options object that is being passed tousePageGesture
hook should prevent detection of the orientation that is not specified. I.e. ifhorizontal
is specified only that direction should be detected.Actual Result
It looks like
usePageGesture
hook already accepts an options object withorientation
prop on it, but it doesn't seem to have any affect at the moment.