When using Virtualize HOC for infinite loop, swiping works fine, but when changing the index with the previous and next button the the slides do not animate
See original GitHub issueI’ve implemented the infinite swipe like this:
import SwipeableViews from 'react-swipeable-views'
import virtualize from 'react-swipeable-views-utils/lib/virtualize'
import mod from 'react-swipeable-views-core/lib/mod'
...
const EnhancedSwipeableViews = virtualize(SwipeableViews)
const slideRenderer = ({key, index}) => (
<HouseCard
key={index}
title={props.houseTypes[(mod(index, props.houseTypes.length))].title}
slug={props.houseTypes[(mod(index, props.houseTypes.length))].slug}
/> )
...
<EnhancedSwipeableViews
index={this.state.swipeIndex}
onChangeIndex={this.handleChangeIndex}
slideRenderer={slideRenderer}
/>
<ArrowNext
key='next'
onClick={() => this.setState({swipeIndex: this.state.swipeIndex + 1})}
>
<ArrowPrev
key='prev'
onClick={() => this.setState({swipeIndex: this.state.swipeIndex - 1})}
>
I’ve implemented the SwipeableView with virtualize as seen in the code above. The infinite loop works pretty good while swiping. However when i click the ArrowNext or the ArrowPrev button to go the the next or previous slide, the slides changes postiton, but the transition from the slide change is gone. The correct slide appears with no transition at all. Does someone know what the solution is to the problem?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
slick slider - css transition infinite loop bug - Stack Overflow
I've tried a few different slider plugins and they all seem to have similar issues.
Read more >Lightkey User Guide
alongside your DMX lights through the same user interface. Setting up a lighting installation with Lightkey is quick and easy. It comes with...
Read more >react-swipeable-views - Bountysource
So the children of SwipableViews changes dynamically. When this happens, this component successfully navigates to the new slide, but there is no animation....
Read more >React scroll to element after render - Caritas Castellaneta
In this case, we can use the React. 2. Modify the render() method useMenu. Now the next step is to figure out how...
Read more >How Is the Internet Changing the Way You Think? - Edge.org
I do not think that the Internet has changed the ability of my brain to do this. While we may use the word...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Jianru-Lin Thank you!!!
I am having the same issue in my project. Actually the animation stops at the third slide (3/8 slides) Any solution to this?