-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Index not updating #4
Comments
Seems like if I don't bind onMomentumScrollEnd, the index updates. Still not sure if that was a bug, but this works for me. |
Thanks @subpublicanders First update index, then call /**
* Scroll end handle
* @param {object} e native event
*/
onScrollEnd(e) {
// update scroll state
this.setState({
isScrolling: false
})
let offset = e.nativeEvent.contentOffset
this.updateIndex(offset, this.state.dir)
// if `onMomentumScrollEnd` registered will be called here
this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd.call(this)
}, |
Well, I solved it by not using |
oh yes, onMoementumScrollEnd be overridden, thanks, i will fix it later. |
* TypeError: Cannot assign to read only property 'onScroll' of object…
@leecade when im loading content from some rest service, onMomentumScrollEnd and onIndexxhanged related is not working till the response returns back to the application from API. can you have any idea on this ??? |
Hello.
I've bound onMomentumScrollEnd and there I'm console logging the ref to my Swiper.
The state.index is always set to 0.
Is that a bug or is there another way to find out which node is viewed?
The text was updated successfully, but these errors were encountered: