Skip to content

Commit fdb67e8

Browse files
authored
Merge pull request #36 from Kiru100/master
Allow props to be passed in the scroll view and updated scroll view types.
2 parents 43e1995 + 6930778 commit fdb67e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
NativeSyntheticEvent,
1414
Platform,
1515
ScrollView,
16+
ScrollViewProps,
1617
StyleSheet,
1718
Text,
1819
View,
@@ -63,7 +64,7 @@ export type ScrollPickerProps<ItemT extends string | number> = {
6364
// tried using ComponentType<ScrollViewProps & { ref: React.RefObject<ScrollView> }>
6465
// but ScrollView component from react-native-gesture=handler is not compatible with this.
6566
scrollViewComponent?: any;
66-
};
67+
} & ScrollViewProps;
6768

6869
export type ScrollPickerHandle = {
6970
scrollToTargetIndex: (val: number) => void;
@@ -256,6 +257,7 @@ const ScrollPicker: { <ItemT extends string | number>(props: ScrollPickerProps<I
256257
onScrollEndDrag={(e: NativeSyntheticEvent<NativeScrollEvent>) =>
257258
onScrollEndDrag(e)
258259
}
260+
{...props}
259261
>
260262
{header}
261263
{props.dataSource.map(renderItem)}

0 commit comments

Comments
 (0)