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

Fix CalendarList scroll bug #1213

Closed
wants to merge 1 commit into from

Conversation

tomjohn1028
Copy link

The Issue

https://www.loom.com/share/156836f07c804eadb59bef856b4b3516
Note: Each time the mouse is moving I'm clicking and trying to scroll.

The video above details an issue trying to scroll the CalendarList component. I eventually found out it was related to react-native-swipe-gestures returning a null value when swiping and causing the Calendar component to hijack the gesture handling (see null issue )

Proposed Solution

Below is a proposed patch that adds a new disableCalendarGestureRecognizer property to the _Calendar_component. When using a "infinite" vertically scrolled CalendarList there is no need for the Calendar items to handle or recognize any gestures.

@santiagomartinez
Copy link

This solves #1224

@chenei
Copy link
Collaborator

chenei commented Jul 30, 2020

Hi @tomjohn1028 and @santiagomartinez ,

Sorry for the performance issue. you right, we shouldn't detect a left/right gesture on vertical scrolling.

Thanks for contributing @tomjohn1028. I just want to let you know that we already have a prop called enableSwipeMonths which is set to false by default.
To take advantage of this prop, I submit this PR:
#1248
can you please review? it achieves the same result using less code.

@emilisb
Copy link
Member

emilisb commented Dec 2, 2020

Hi @tomjohn1028 @chenei ,

I believe this issue was solved by #1248 , wasn't it? If so, can we close this PR?

@tomjohn1028
Copy link
Author

@chenei @emilisb My apologies I haven't been able to work on my app in quite some time and these comments must have been lost in the shuffle.

#1248 looks like a good fix. I'll close this out

@tomjohn1028 tomjohn1028 closed this Dec 2, 2020
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.

4 participants