recyclerlistview icon indicating copy to clipboard operation
recyclerlistview copied to clipboard

onScroll not firing when scrollview have refresh control

Open ardyfeb opened this issue 5 years ago • 3 comments

If refresh control defined onScroll event not called, otherwise everything is work fine.

Without refresh control

The filter panel respond for the scroll event

nfc

With refresh control

Never respond

rc

import { default as Animated } from 'react-native-reanimated'

const AnimatedRecyclerList: typeof RecyclerListView = Animated.createAnimatedComponent(RecyclerListView);
const { 
  multiply,
  interpolate,
  diffClamp,
  event,
} = Animated;

<AnimatedRecyclerList
  onScroll={
    event(
      [
        {
          nativeEvent: {
            contentOffset: {
              y: this.scrollY,
            },
          },
        },
      ]
    )
  }
  scrollViewProps={{
    refreshControl: (
      <RefreshControl
        refreshing={fetching}
        onRefresh={this.onResfresh}
        progressViewOffset={styles.scrollContainer.paddingTop}
      />
    ),
    contentContainerStyle: styles.scrollContainer,
  }}
  optimizeForInsertDeleteAnimations={true}
  dataProvider={order}
  layoutProvider={layoutProvider}
  renderAheadOffset={window.height / 2}
  forceNonDeterministicRendering={true}
  rowRenderer={this.renderItem}
/>

ardyfeb avatar Feb 13 '20 07:02 ardyfeb

Can you do this without Animated.event? As of now that is not supported. We will be fixing that in the future.

naqvitalha avatar Feb 18 '20 07:02 naqvitalha

@naqvitalha is it still not supported yet?

AbanoubNassem avatar Jul 15 '20 10:07 AbanoubNassem

Hello there @naqvitalha I am having the same issue. seems to be on android only. We really need this functioning correctly for our project. Is there anyway we can pay to accelerate the fix to this?

haibert avatar Sep 28 '21 16:09 haibert