Skip to content

Drawer - trigger onToggleSwipeLeft on releases #860

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

Merged
merged 6 commits into from
Jul 21, 2020

Conversation

Inbal-Tish
Copy link
Collaborator

Fix for trigger event on release instead of just threshold

Copy link
Collaborator

@ethanshar ethanshar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why, but the PR show only some of the changes in the code, it's really confusing. Hope I didn't miss anything..

@@ -303,8 +303,8 @@ export default class Swipeable extends Component<PropType, StateType> {
}
});

if (toValue === rowWidth * LEFT_TOGGLE_THRESHOLD && onToggleSwipeLeft) {
onToggleSwipeLeft({rowWidth, leftWidth});
if ((toValue === rowWidth * LEFT_TOGGLE_THRESHOLD || this.dragFired) && onToggleSwipeLeft) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I wasn't sure where this comes from (this.dragFired) I think the PR is missing some of the code changes.
Anyway, the name of the variable was a little confusing to me.
Is the flag purpose is to mark when the drag exceed threshold? if so, consider renaming it..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Inbal-Tish
Copy link
Collaborator Author

@ethanshar This is a second PR for this ticket. The first was merged and this is the changes UX ask for so maybe that's why you think some of the changes are not showing in the code?

@ethanshar ethanshar merged commit 4ce92eb into master Jul 21, 2020
@Inbal-Tish Inbal-Tish deleted the fix/Drawer_left_toggle branch July 21, 2020 09:27
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.

2 participants