Skip to content

Commit 541b907

Browse files
authored
Merge pull request #1522 from Gueoff/master
Add nestedScrollEnabled props
2 parents 67c40ff + 5a2190b commit 541b907

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/calendar-list/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ class CalendarList extends Component<CalendarListProps, State> {
9696
keyboardShouldPersistTaps: PropTypes.oneOf(['never', 'always', 'handled']),
9797
keyExtractor: PropTypes.func,
9898
onEndReachedThreshold: PropTypes.number,
99-
onEndReached: PropTypes.func
99+
/** Called once when the scroll position gets within onEndReachedThreshold */
100+
onEndReached: PropTypes.func,
101+
/** Enables nested scrolling for Android API level 21+ */
102+
nestedScrollEnabled: PropTypes.bool
100103
};
101104

102105
static defaultProps = {
@@ -109,7 +112,8 @@ class CalendarList extends Component<CalendarListProps, State> {
109112
scrollsToTop: false,
110113
scrollEnabled: true,
111114
removeClippedSubviews: constants.isAndroid,
112-
keyExtractor: (_: any, index: number) => String(index)
115+
keyExtractor: (_: any, index: number) => String(index),
116+
nestedScrollEnabled: true
113117
};
114118

115119
style: any;
@@ -352,6 +356,7 @@ class CalendarList extends Component<CalendarListProps, State> {
352356
keyExtractor={this.props.keyExtractor}
353357
onEndReachedThreshold={this.props.onEndReachedThreshold}
354358
onEndReached={this.props.onEndReached}
359+
nestedScrollEnabled={this.props.nestedScrollEnabled}
355360
/>
356361
{this.renderStaticHeader()}
357362
</View>

0 commit comments

Comments
 (0)