Skip to content

Commit d123708

Browse files
author
Tautvilas Mečinskas
authored
Merge pull request #319 from ChurchDesk/fix/add-scrollsToTop-prop
Fix/add scrollsToTop prop
2 parents ddb8bbd + fac46f1 commit d123708

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/calendar-list/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class CalendarList extends Component {
2727

2828
// Enable or disable vertical scroll indicator. Default = false
2929
showScrollIndicator: PropTypes.bool,
30+
31+
// When true, the calendar list scrolls to top when the status bar is tapped. Default = true
32+
scrollsToTop: PropTypes.bool
3033
};
3134

3235
constructor(props) {
@@ -178,6 +181,7 @@ class CalendarList extends Component {
178181
keyExtractor={(item, index) => index}
179182
initialScrollIndex={this.state.openDate ? this.getMonthIndex(this.state.openDate) : false}
180183
getItemLayout={this.getItemLayout}
184+
scrollsToTop={this.props.scrollsToTop !== undefined ? this.props.scrollsToTop : true}
181185
/>
182186
);
183187
}

0 commit comments

Comments
 (0)