Shopify / Shopify/flash-list

viewableItems not working correctly with an absolute header

Open
#2,238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

agent-triage bug P2
Dominant language
TypeScript
Stars
7.2k
Forks
393
Avg merge
1d 3h
Merged PRs (30d)
1

Description

Description

I use an absolutely positioned header above my FlashList. I tried setting the offset in stickyHeaderConfig or progressViewOffset to match the header height, but the viewableItems from onViewableItemsChanged still include items that are under the header and should not be considered visible.

Current behavior

viewableItems includes items that aren’t actually visible.

Expected behavior

viewableItems should not include items that are under the header.

FlashList version: 2.3.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing FlashList's viewability handling for onViewableItemsChanged, then compare how stickyHeaderConfig.offset and progressViewOffset affect visibility calculations. Reproduce the issue with an absolutely positioned header on FlashList 2.3.1; done means viewableItems excludes items covered by that header.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.