From 8feab5f92cbe8daaaaa1ff9f142b11bfd4400ac1 Mon Sep 17 00:00:00 2001 From: Aravind M Nair Date: Sun, 13 Sep 2026 16:00:24 +0530 Subject: [PATCH] Fix misleading ListItemComponent JSDoc in VirtualizedList types The comment said ListItemComponent receives index and separators in addition to what renderItem gets, but _renderElement passes the same item, index and separators to both. Say that, and note that ListItemComponent takes precedence when both are set. --- packages/virtualized-lists/Lists/VirtualizedList.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/virtualized-lists/Lists/VirtualizedList.d.ts b/packages/virtualized-lists/Lists/VirtualizedList.d.ts index 85c1c9f258fc..06d5e63b9973 100644 --- a/packages/virtualized-lists/Lists/VirtualizedList.d.ts +++ b/packages/virtualized-lists/Lists/VirtualizedList.d.ts @@ -190,8 +190,8 @@ export interface VirtualizedListWithoutRenderItemProps< /** * Each data item is rendered using this element, as an alternative to `renderItem`. - * Can be a React Component Class or a render function. In addition to the data provided - * to `renderItem`, this receives `index` and `separators` metadata. + * It receives the same `item`, `index` and `separators` that `renderItem` gets. If both + * are provided, `ListItemComponent` takes precedence and a warning is logged. */ ListItemComponent?: React.ComponentType | React.ReactElement | null | undefined;