Skip to content
Snippets Groups Projects
Unverified Commit 0b437325 authored by ThibG's avatar ThibG Committed by GitHub
Browse files

Fix column swiping animation logic (#15301)


From the start, swiping columns was highly unreliable because the logic
could change `ReactSwipeableViews`'s `animateTransitions` property
mid-swipe.

PR #11200 partially fixed this, but at the unintended cost of disabling the
swipe animation altogether.

This PR changes the logic behind `shouldAnimate` to only disable the swiping
animation at the end of a column change not initiated by `ReactSwipeableViews`.

Co-authored-by: default avatarClaire <claire.github-309c@sitedethib.com>
parent 9620ee90
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,9 @@ class ColumnsArea extends ImmutablePureComponent {
}
componentWillReceiveProps() {
this.setState({ shouldAnimate: false });
if (typeof this.pendingIndex !== 'number' && this.lastIndex !== getIndex(this.context.router.history.location.pathname)) {
this.setState({ shouldAnimate: false });
}
}
componentDidMount() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment