-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add 'swipeEnabled' prop #47
base: master
Are you sure you want to change the base?
Conversation
Summary: When false, the view cannot be swiped. The default value is true.
Thank you for PR. How about use
|
Summary: When false, the view cannot be swiped. The default value is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. :)
It will be merged after some test.
Any updates on this? |
@JeffGuKang When do you plan to merge this? |
@dioseltorre Sorry for late reply. I will manage this until this week. |
_handleShouldSetPanResponder(evt, gestureState) { | ||
return ( | ||
this.props.swipeEnabled && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than setting a defaultProp
value below, you could simply check if swipeEnabled is not false:
this.props.swipeEnabled !== false
@@ -122,4 +123,8 @@ class GestureRecognizer extends Component { | |||
} | |||
} | |||
|
|||
GestureRecognizer.defaultProps = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then you can get rid of this....
... |
When false, the view cannot be swiped. The default value is true.