react-native-collapsible-tab-view icon indicating copy to clipboard operation
react-native-collapsible-tab-view copied to clipboard

Infinite Scroll - allow passing through or combining onScroll events

Open alexpchin opened this issue 4 years ago • 3 comments

Feature request

An infinite scroll example.

Current behavior

I have a Tab.FlatList with an infinite load. I was using an onMomentumScrollBegin with FlatList to throttle a call to onEndReached. However, now onMomentumScrollBegin doesn't fire as we're using react-native-reanimated.

If I create a scrollHandler with:

const scrollHandler = useAnimatedScrollHandler({
  onBeginDrag: (e) => {
    console.log('onBeginDrag');
  },
  onEndDrag: (e) => {
    console.log('onEndDrag');
  },
  onMomentumScrollBegin: (e) => {
    console.log('onMomentumScrollBegin');
  },
  onMomentumScrollEnd: (e) => {
    console.log('onMomentumScrollEnd');
  },
});

And pass to:

<Tabs.FlatList
  onScroll={scrollHandler}
  .
  .

I don't believe this will not be called as onScroll is created in the library.

alexpchin avatar Feb 23 '21 20:02 alexpchin

I'm facing the same issue. The onMomentumScrollBegin doesn't fire. Any solutions? Thank you

anhquan291 avatar Feb 17 '22 15:02 anhquan291

Any update here @PedroBern ?

sahil-ahuja-1 avatar Jun 19 '22 22:06 sahil-ahuja-1

Also have this issue - React-Native-Tab-With-Infinite-Scroll seems to have a fix?

IB3N avatar Apr 11 '23 16:04 IB3N