Skip to content

Commit

Permalink
add numColumns to restProps passed to VirtualizedList
Browse files Browse the repository at this point in the history
  • Loading branch information
fabOnReact committed Mar 15, 2022
1 parent 489ebe4 commit 3a11bff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions Libraries/Lists/FlatList.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,6 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {

render(): React.Node {
const {
numColumns,
columnWrapperStyle,
removeClippedSubviews: _removeClippedSubviews,
...restProps
Expand All @@ -653,7 +652,6 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
getItem={this._getItem}
getItemCount={this._getItemCount}
keyExtractor={this._keyExtractor}
numColumns={numColumnsOrDefault(numColumns)}
ref={this._captureRef}
viewabilityConfigCallbackPairs={this._virtualizedListPairs}
removeClippedSubviews={removeClippedSubviewsOrDefault(
Expand Down
3 changes: 2 additions & 1 deletion Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
|};
Expand Down

0 comments on commit 3a11bff

Please sign in to comment.