From 3a11bff4be8ef30b73faad1167fe45ef0de6d2cc Mon Sep 17 00:00:00 2001 From: fabriziobertoglio1987 Date: Tue, 15 Mar 2022 13:28:53 +0800 Subject: [PATCH] add numColumns to restProps passed to VirtualizedList --- Libraries/Lists/FlatList.js | 2 -- Libraries/Lists/VirtualizedList.js | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Libraries/Lists/FlatList.js b/Libraries/Lists/FlatList.js index 99a890be998ef6..f9611f8ac13265 100644 --- a/Libraries/Lists/FlatList.js +++ b/Libraries/Lists/FlatList.js @@ -641,7 +641,6 @@ class FlatList extends React.PureComponent, void> { render(): React.Node { const { - numColumns, columnWrapperStyle, removeClippedSubviews: _removeClippedSubviews, ...restProps @@ -653,7 +652,6 @@ class FlatList extends React.PureComponent, void> { getItem={this._getItem} getItemCount={this._getItemCount} keyExtractor={this._keyExtractor} - numColumns={numColumnsOrDefault(numColumns)} ref={this._captureRef} viewabilityConfigCallbackPairs={this._virtualizedListPairs} removeClippedSubviews={removeClippedSubviewsOrDefault( diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 3e45a59f0ded35..11f1f36c072564 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -98,7 +98,8 @@ type RequiredProps = {| */ getItemCount: (data: any) => number, /** - * The number of columns. Default is 1. Used to calculated accessibilityCollection prop. + * The number of columns used in FlatList. + * The default of 1 is used in other components to calculate the accessibilityCollection prop. */ numColumns?: number, |};