Skip to content

Commit fac46f1

Browse files
author
Abdalla Mohamed Elabd
committed
fix(CalendarList): make the scrollsToTop default true
1 parent b026acc commit fac46f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/calendar-list/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CalendarList extends Component {
2828
// Enable or disable vertical scroll indicator. Default = false
2929
showScrollIndicator: PropTypes.bool,
3030

31-
// When true the scroll view scrolls to top when the status bar is tapped
31+
// When true, the calendar list scrolls to top when the status bar is tapped. Default = true
3232
scrollsToTop: PropTypes.bool
3333
};
3434

@@ -181,7 +181,7 @@ class CalendarList extends Component {
181181
keyExtractor={(item, index) => index}
182182
initialScrollIndex={this.state.openDate ? this.getMonthIndex(this.state.openDate) : false}
183183
getItemLayout={this.getItemLayout}
184-
scrollsToTop={this.props.scrollsToTop}
184+
scrollsToTop={this.props.scrollsToTop !== undefined ? this.props.scrollsToTop : true}
185185
/>
186186
);
187187
}

0 commit comments

Comments
 (0)