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 cuts off after state update on another page #1215

Open
kchangch opened this issue Aug 24, 2020 · 16 comments
Open

Swiper cuts off after state update on another page #1215

kchangch opened this issue Aug 24, 2020 · 16 comments

Comments

@kchangch
Copy link

Screen Shot 2020-08-24 at 11 24 13 AM

After I swipe to the second page, if a state update occurs on the previous page, the current page gets drifted to the left. Is there any solution to this issue?

@slolkunchik
Copy link

slolkunchik commented Aug 25, 2020

the same problem - if I like the page and state updates, the screen changes the page on another one, but pagination stays the same. Then I swipe and see on the same pagination necessary liked screen. So once again, pagination stays the same. And then if there no more state updates, the swiper works as usual.
That's just on ios, android works properly.

@kchangch
Copy link
Author

Is there any solution to this issue?

@frasermince
Copy link

I just ran into this issue too and fixed it by using the current master ref in my package.json. Looks like this is fixed in master!

@kchangch
Copy link
Author

kchangch commented Sep 1, 2020

Can you expand on changing the ref to master? Sorry i'm quiet new to this

@frasermince
Copy link

Sure! In my package.json I changed:
"react-native-swiper": "^1.6.0",
to
"react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",

@kwameaj67
Copy link

Sure! In my package.json I changed:
"react-native-swiper": "^1.6.0",
to
"react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",

still doesn't work

@ValerianThomas
Copy link

Hi Guys,
I have encounter the same issue.
Any updates ?

@QAQmmttyyy
Copy link

same issue #1171
#1174 Please try this. Actually it's already fixed, but missed in the 1.6.0 release.

@QAQmmttyyy
Copy link

@

same issue #1171
#1174 Please try this. Actually it's already fixed, but missed in the 1.6.0 release.

@kchangch

@mohity7777
Copy link

mohity7777 commented Dec 17, 2020

when is this thing going to get updated ??

@QAQmmttyyy
Copy link

QAQmmttyyy commented Dec 17, 2020

@skv-headless @mohity7777
Look at the comment.

  renderScrollView = pages => {
    return (
      <ScrollView
        ref={this.refScrollView}
        {...this.props}
        {...this.scrollViewPropOverrides()}
        contentContainerStyle={[styles.wrapperIOS, this.props.style]}
        // try remove this line. or sync the state.offset with internal.offset.
        // contentOffset={this.state.offset}
        onScrollBeginDrag={this.onScrollBegin}
        onMomentumScrollEnd={this.onScrollEnd}
        onScrollEndDrag={this.onScrollEndDrag}
        style={this.props.scrollViewStyle}
      >
        {pages}
      </ScrollView>
    )
  }

@mohity7777
Copy link

Actually doing the changes in node modules solved my issue. I just meant that why is this not there in latest release ?

@nerdic-coder
Copy link

Sure! In my package.json I changed:
"react-native-swiper": "^1.6.0",
to
"react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",

This solved it for me. Thank you!
They should really publish this as an 1.6.1, since this seems to be a common issue.

@kckunal2612
Copy link

Sure! In my package.json I changed: "react-native-swiper": "^1.6.0", to "react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",

Thank you, this was a life-saver!

@davemannn
Copy link

Sure! In my package.json I changed:
"react-native-swiper": "^1.6.0",
to
"react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",

You're a super-man!

@ghost
Copy link

ghost commented May 30, 2023

Sure! In my package.json I changed:
"react-native-swiper": "^1.6.0",
to
"react-native-swiper": "https://github.com/leecade/react-native-swiper#5827a80002738abd1c0dc08428303c79bbc840c0",

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

10 participants