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

Pass extraData to stickyOverrideRowRenderer #1310

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

elliottkember
Copy link

@elliottkember elliottkember commented Aug 7, 2024

Description

Fixes (issue #1152)

In our usage of FlashList, we have a "selected" checkbox on the sticky header of each group. This header item allows the user to select all items in the group. However, when using sticky headers, selecting the group doesn't update the header row.

When these rows are stuck to the top, they don't update when extraData changes. When they come unstuck from the top, they update immediately. Regular header rows are updated when extraData changes, but these for some reason aren't.

We've been testing this locally and it works nicely. I don't know whether there's a specific reason that extraData is not included in sticky row renderers, but it seems reasonable that rows should behave the same way when they're stuck as they do when they're not stuck.

Reviewers’ hat-rack 🎩

  • Use dynamic data with stickyHeaderIndexes
  • Update some data while a header item is sticky
  • Ensure that the sticky header updates the same way as a non-sticky header

Screenshots or videos (if needed)

This happened on a work application, so I probably shouldn't share screen recordings of the issue. I can create a sample application if it's absolutely needed, but this change is pretty simple and I don't know whether it's required.

Checklist

…eaders

In our usage of FlashList we have a "selected" checkbox on the sticky header of each group. 

When these rows are stuck to the top, they don't update when `extraData` changes. When they come unstuck from the top, they update immediately. Regular header rows are updated when `extraData` changes, but these for some reason aren't.

We've been testing this locally and it works nicely. I don't know whether there's a specific reason that `extraData` is not included in sticky row renderers, but it seems reasonable that rows should behave the same way when they're stuck as they do when they're not stuck.
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

Successfully merging this pull request may close these issues.

1 participant