Skip to content

Commit d2c1559

Browse files
committed
Incubator.WheelPicker - allow sending FlatListProps (#2417)
1 parent 712e162 commit d2c1559

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/incubator/WheelPicker/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ export interface WheelPickerProps {
9292
* Change the default (white) tint color of the fade view.
9393
*/
9494
faderProps?: Omit<FaderProps, 'visible' | 'position'>;
95+
/**
96+
* Props to be sent to the FlatList
97+
*/
98+
flatListProps?: Partial<FlatListProps<ItemProps>>;
9599
}
96100

97101
const WheelPicker = ({
@@ -112,7 +116,8 @@ const WheelPicker = ({
112116
initialValue = 0,
113117
separatorsStyle,
114118
testID,
115-
faderProps
119+
faderProps,
120+
flatListProps
116121
}: WheelPickerProps) => {
117122
const scrollView = useRef<Animated.ScrollView>();
118123
const offset = useSharedValue(0);
@@ -317,6 +322,7 @@ const WheelPicker = ({
317322
<View row centerH>
318323
<View flexG>
319324
<AnimatedFlatList
325+
{...flatListProps}
320326
testID={`${testID}.list`}
321327
listKey={`${testID}.flatList`}
322328
height={height}

0 commit comments

Comments
 (0)