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

onMomentumScrollEnd not firing #21

Closed
haibert opened this issue Jun 28, 2021 · 2 comments
Closed

onMomentumScrollEnd not firing #21

haibert opened this issue Jun 28, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@haibert
Copy link

haibert commented Jun 28, 2021

const onMomentumScrollEnd = useCallback((ev) => {
       const index = Math.floor(
           ev.nativeEvent.contentOffset.x.toFixed(0) / width.toFixed(0)
       )
       scrollToActiveIndex(index)
       // setActiveIndex(index)
   }, [])

             <BigList
               ref={bigListRef}
               data={image}
               renderItem={render}
               onMomentumScrollEnd={onMomentumScrollEnd}
               onScrollEndDrag={handleScroll}
               initialScrollIndex={scrollIndex}
               onScrollToIndexFailed={scrollFailed}
               itemHeight={rowHeightAdjusted}
               getItemLayout={layOut}
               alwaysBounceVertical={false}
               bounces={false}
               scrollEventThrottle={16}
               style={{
                   marginTop: insets.top + 40,
                   marginBottom: insets.bottom + 70 + 30,
               }}
               // carousel props
               pagingEnabled
               showsHorizontalScrollIndicator={false}
               horizontal
           />

Hey guys I cant get onMomentumScrollEnd to fire, if this prop supported?

marcocesarato added a commit that referenced this issue Jun 28, 2021
@marcocesarato marcocesarato added the bug Something isn't working label Jun 29, 2021
@marcocesarato
Copy link
Owner

Hi @haibert, this should be fixed on 1.3.15, let me know if not it works.

@haibert
Copy link
Author

haibert commented Jun 29, 2021

Fixed!!! You're awesome man. There is not many easy to use performant list components for Expo... without this my entire project would be a huge pain. Thanks again.

@haibert haibert closed this as completed Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants