Skip to content
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

Swiper virtualize slideRenderer animation is not normal #669

Open
1 task
luther-nwpu opened this issue Jun 13, 2022 · 0 comments
Open
1 task

Swiper virtualize slideRenderer animation is not normal #669

luther-nwpu opened this issue Jun 13, 2022 · 0 comments

Comments

@luther-nwpu
Copy link

luther-nwpu commented Jun 13, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

origin:
Current animation use

   this.setIndexCurrent(index);
   this.setState({
     // If true, we are going to change the children. We shoudn't animate it.
     displaySameSlide: getDisplaySameSlide(this.props, nextProps),
     indexLatest: index,
   });

change transform use dom
change transition use setState

It's dependence on the render time;

if in render write console.log or new some react node,it's not normal。

solute this question two method:
method 1, all use setState。

method 2,setTimeout(() => {
change transfrom use dom
})

I adjust use method 1

Steps to Reproduce (for bugs)

Context

Your Environment

Tech Version
react-swipeable-views 14.0
React
platform
etc
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

No branches or pull requests

1 participant