-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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 prop disableSwipe to LeftNav #1258
Conversation
@@ -39,6 +40,7 @@ let LeftNav = React.createClass({ | |||
getDefaultProps() { | |||
return { | |||
docked: true, | |||
disableSwipe: 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.
false
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.
I think the default behavior is disabled. Could you explain more here ?
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.
You are introducing a breaking changing by changing the default behavior (of the code).
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.
Fixed! Thank you.
@checkraiser, I think that issue #1222 that you've probably tried to address was only about disabling opening the nav using a swipe, but not both opening and closing it. But now if you set |
@pomerantsev Please check the code to test it. I think it's enough for your use case. |
Perhaps the prop name should be |
@@ -39,6 +40,7 @@ let LeftNav = React.createClass({ | |||
getDefaultProps() { | |||
return { | |||
docked: true, | |||
disableSwipe: false, |
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.
Typo here - should be disableSwipeOut
@checkraiser: This component's behavior has become even weirder with the latest changes:
Anyway, I went ahead and implemented the fix in #1279 - it is a very simple change, no need for much code here. |
@pomerantsev Your PR seems pretty straight forward. I'm assuming it makes this PR unnecessary? |
@ALL: It's OK. I will close here. Wait for the next PR ! :) |
When setting props disableSwipe to true, the swipe behavior only affects when the LeftNav is opening, and we cannot open LeftNav by swiping.