Skip to content

Commit fa00342

Browse files
authored
Merge pull request #1699 from bmatasar/patch-2
Agenda renders only for the first item of the day
2 parents cb7f19a + 5ba3ba7 commit fa00342

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/agenda/reservation-list/reservation.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export interface ReservationProps {
1919
theme: Theme;
2020
/** specify your item comparison function for increased performance */
2121
rowHasChanged?: (a: any, b: any) => boolean;
22-
/** specify how each date should be rendered. day can be undefined if the item is not first in that day */
23-
renderDay?: (date: XDate, item?: DayReservations) => React.Component;
22+
/** specify how each date should be rendered. date can be undefined if the item is not first in that day */
23+
renderDay?: (date?: XDate, item?: DayReservations) => React.Component;
2424
/** specify how each item should be rendered in agenda */
2525
renderItem?: (reservation: any, isFirst: boolean) => React.Component;
2626
/** specify how empty date content with no items should be rendered */
@@ -75,7 +75,7 @@ class Reservation extends Component<ReservationProps> {
7575
}
7676

7777
renderDate(date?: XDate, item?: DayReservations) {
78-
if (isFunction(this.props.renderDay) && date) {
78+
if (isFunction(this.props.renderDay)) {
7979
return this.props.renderDay(date, item);
8080
}
8181

0 commit comments

Comments
 (0)