-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix virtualized cell keys for list headers and footers
Summary: The change enabling virtualization in nested lists contained a hidden assumption that nested lists would only appear within the *cells* of a parent list. If a list header or footer component contains a `VirtualizedList`, that child list won't be wrapped in a `CellRenderer` component and therefore won't have access to `virtualizedCellRenderer` through its context. This causes an error when the child list tries to access the `cellKey` property on an undefined object. This change wraps the header/footer views in a `VirtualizedCellWrapper` component which supplies that context properly. Reviewed By: sahrens Differential Revision: D6603342 fbshipit-source-id: 4d2d82f04947048a16ec9968121d8ecc8c95655a
- Loading branch information
1 parent
f1055bc
commit a010a0c
Showing
1 changed file
with
50 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters