Skip to content

Swiper virtualize slideRenderer animation is not normal  #669

@luther-nwpu

Description

@luther-nwpu
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions