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

Expo Web - Flatlist "Pull to Refresh" Not Working #6645

Closed
CoinCoderBuffalo opened this issue Dec 31, 2019 · 1 comment
Closed

Expo Web - Flatlist "Pull to Refresh" Not Working #6645

CoinCoderBuffalo opened this issue Dec 31, 2019 · 1 comment
Labels

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}
/>
@cruzach
Copy link
Contributor

cruzach commented Jan 3, 2020

Closing here since you already opened the same issue in the react native web repo (where I believe it is better suited, but I haven't tested this myself)

@cruzach cruzach closed this as completed Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants