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

Flatlist pull to refresh does not work on web #1516

Closed
CoinCoderBuffalo opened this issue Jan 3, 2020 · 2 comments
Closed

Flatlist pull to refresh does not work on web #1516

CoinCoderBuffalo opened this issue Jan 3, 2020 · 2 comments

Comments

@CoinCoderBuffalo
Copy link

Flatlist pull to refresh does not work on web. Works fine on Android and iOS.

Tested with:
Browser: Chrome
Device: Pixel 3
Expo SDK 35
React 16.8.3

Sample code snippets:

<View style={{flex:1}}>
      <PostsFlatList navigation={props.navigation} type={typeParam} reload={reloadParam} />
</View>

const [refreshing, setRefreshing] = useState(false);

 const _handleRefresh = () => {
    console.log('called _handleRefresh')
    setRefreshing(true);
    setPosts([]);
    setPage(1);
  }

<FlatList
      numColumns={Layout.columnCount}
      data={posts}
      ListHeaderComponent={_renderHeader}
      renderItem={_renderItem}
      keyExtractor={(item, index) => String(index)}
      onEndReachedThreshold={0.5}
      onEndReached={_handleLoadMore}
      refreshing={refreshing}
      onRefresh={_handleRefresh}
      removeClippedSubviews={false}
      maxToRenderPerBatch={15}
      updateCellsBatchingPeriod={100}
      initialNumToRender={6}
      windowSize={21}
/>
@trevwaddell
Copy link

Refresh control hasn't been implemented yet #1027

@necolas
Copy link
Owner

necolas commented May 27, 2020

Duplicates #1027

@necolas necolas closed this as completed May 27, 2020
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

3 participants