bug while using custom template for openDayEventsTemplate
See original GitHub issueDescribe the bug
the events are being populated in all the rows while using custom template.
Minimal reproduction of the problem with instructions
<mwl-calendar-month-view *ngSwitchCase=“CalendarView.Month” [openDayEventsTemplate]=“customOpenDayEventsTemplate” [viewDate]=“viewDate” [events]=“currentEvents” [refresh]=“refresh” [activeDayIsOpen]=“activeDayIsOpen” (dayClicked)=“dayClicked($event.day)” (eventClicked)=“handleEvent(‘Clicked’, $event.event)” (eventTimesChanged)=“eventTimesChanged($event)”> </mwl-calendar-month-view>
<ng-template #customOpenDayEventsTemplate let-events=“events” let-eventClicked=“eventClicked” let-isOpen=“activeDayIsOpen”> <ion-item-group [@collapse]> <div *ngFor=“let event of events; trackBy:trackByEventId;” [ngClass]=“event?.cssClass” mwlDraggable [dropData]=“{event: event}” [dragAxis]=“{x: event.draggable, y: event.draggable}”> test
</div> </ion-item-group></ng-template>
Screenshots
Versions
@angular/core
: 6.0.9angular-calendar
: ^0.26.4- Browser name and version:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
Ahh, I see what happened here, I think you might have copied the template from an older issue, please see the latest template source here, here’s your example fixed: https://stackblitz.com/edit/angular-jqsjdc-gahtmy?file=demo/component.ts Hope that helps! 😄
Please can you add a runnable stackblitz that reproduces your problem? You can fork a starter from any of the demos pages. Thanks! 😄