Skip to content

Commit 38dd49c

Browse files
author
Daniel Borstelmann
committed
naming conventions
1 parent 2e389d6 commit 38dd49c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ theme={{
236236
}}
237237
```
238238

239-
**Disclaimer**: issues that arise because something breaks after using stylesheet override will not be supported. Use this option at your own risk.
239+
**Disclaimer**: issues that arise because something breaks after using stylesheet override will not be supported. Use this option at your own risk.
240240

241241
### CalendarList
242242

@@ -281,7 +281,7 @@ An advanced agenda component that can display interactive listings for calendar
281281
// callback that gets called when items for a certain month should be loaded (month became visible)
282282
loadItemsForMonth={(month) => {console.log('trigger items loading')}}
283283
// callback that fires when the calendar is opened or closed
284-
calendarToggled={(calendarOpened) => {console.log(calendarOpened)}}
284+
onCalendarToggled={(calendarOpened) => {console.log(calendarOpened)}}
285285
// callback that gets called on day press
286286
onDayPress={(day)=>{console.log('day pressed')}}
287287
// callback that gets called when day changes while scrolling agenda list

src/agenda/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default class AgendaView extends Component {
3838
// callback that gets called when items for a certain month should be loaded (month became visible)
3939
loadItemsForMonth: PropTypes.func,
4040
// callback that fires when the calendar is opened or closed
41-
calendarToggled: PropTypes.func,
41+
onCalendarToggled: PropTypes.func,
4242
// callback that gets called on day press
4343
onDayPress: PropTypes.func,
4444
// callback that gets called when day changes while scrolling agenda list
@@ -215,8 +215,8 @@ export default class AgendaView extends Component {
215215
this.setState({
216216
calendarScrollable: true
217217
});
218-
if (this.props.calendarToggled) {
219-
this.props.calendarToggled(true);
218+
if (this.props.onCalendarToggled) {
219+
this.props.onCalendarToggled(true);
220220
}
221221
// Enlarge calendarOffset here as a workaround on iOS to force repaint.
222222
// Otherwise the month after current one or before current one remains invisible.
@@ -239,8 +239,8 @@ export default class AgendaView extends Component {
239239
calendarScrollable: false,
240240
selectedDay: day.clone()
241241
});
242-
if (this.props.calendarToggled) {
243-
this.props.calendarToggled(false);
242+
if (this.props.onCalendarToggled) {
243+
this.props.onCalendarToggled(false);
244244
}
245245
if (!optimisticScroll) {
246246
this.setState({

0 commit comments

Comments
 (0)