Commit 5306e92
Add missing
Summary:
`ListItemComponent` is a valid prop on `FlatList`, `SectionList` and `VirtualizedList` (it's in the Flow types in `VirtualizedListProps.js`), but it's missing from the `.d.ts`, so TypeScript errors on it even though it works at runtime.
Added it to `VirtualizedListWithoutRenderItemProps` next to the other `List*Component` props, so all three inherit it.
## Changelog:
[GENERAL] [ADDED] - Add missing ListItemComponent type to VirtualizedList props
Pull Request resolved: #57754
Test Plan:
Errors on `main`, type-checks with the change:
```tsx
<FlatList data={[]} ListItemComponent={MyItem} />
```
Type-only, addition only, no runtime changes.
Reviewed By: Abbondanzo
Differential Revision: D114061127
Pulled By: fabriziocucci
fbshipit-source-id: e843645a93b2320370829e8fd86deda078d6852aListItemComponent prop to VirtualizedList/FlatList/SectionList TypeScript types (#57754)1 parent 8e74464 commit 5306e92
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
191 | 199 | | |
192 | 200 | | |
193 | 201 | | |
| |||
0 commit comments