Skip to content

onEndReached section-list mode sometimes not called as expected, resulting our pagination not running well. #1572

Open
@aqigif

Description

@aqigif

Current behavior

onEndReached sometimes not called as expected, resulting our pagination not running well.

Screen.Recording.2025-03-18.at.15.22.39.mov

here's my preview implementation code :

    const handleEndReached = useCallback(() => {
      console.log('end reached');
      if (!isLoading) {
          console.log('page change', filters.page + 1)
          onFilterChange('page', filters.page + 1);
      }
    }, [onPageChange, shouldShowSectionPlaceholder]);
   
    return ( <View style={{ height: '100%' }}>
        {/** header sticky component */}
        <View style={{ height: '100%' }}>
            <FlastList
                ...
                onEndReachedThreshold={0.5}
                onEndReached={handleEndReached}
            />
        </View>
    </View>)

i already follow this documentation https://shopify.github.io/flash-list/docs/guides/section-list/ for section-list implementation btw

Expected behavior

onEndReached should be always called consistently

To Reproduce

Platform:

  • iOS
  • Android

Environment

  • @shopify/flash-list: 1.7.2
  • React Native: 0.72.6
  • System:
    • OS: macOS 15.1
    • CPU: (8) arm64 Apple M3
    • Memory: 149.38 MB / 16.00 GB
    • Shell: zsh 5.9
  • Binaries:
    • Node: 18.20.5
    • Yarn: 1.22.22
    • npm: 10.8.2
    • Watchman: 2024.11.25.00
  • IDEs:
    • Xcode: 16.1/16B40

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions