-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(module:calendar): custom header #8418
feat(module:calendar): custom header #8418
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8418 +/- ##
==========================================
- Coverage 91.61% 91.60% -0.02%
==========================================
Files 519 519
Lines 18076 18074 -2
Branches 2848 2761 -87
==========================================
- Hits 16561 16557 -4
- Misses 1216 1218 +2
Partials 299 299 ☔ View full report in Codecov by Sentry. |
|
||
@if (mode === 'month') { | ||
@if (nzCustomHeader) { | ||
<ng-container [ngTemplateOutlet]="nzCustomHeader"></ng-container> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use nzStringTemplateOutlet instead of ngTemplateOutlet, which allows nzCustomHeader to accept both strings and TemplateRef types.
<nz-calendar-header | ||
[nzCustomHeader]="customHeader" | ||
(yearChange)="year = $event" | ||
(monthChange)="month = $event" | ||
></nz-calendar-header> | ||
|
||
<ng-template #custom> | ||
<p>custom</p> | ||
</ng-template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<nz-calendar-header | |
[nzCustomHeader]="customHeader" | |
(yearChange)="year = $event" | |
(monthChange)="month = $event" | |
></nz-calendar-header> | |
<ng-template #custom> | |
<p>custom</p> | |
</ng-template> | |
<nz-calendar-header | |
[nzCustomHeader]="customHeader" | |
(yearChange)="year = $event" | |
(monthChange)="month = $event" | |
></nz-calendar-header> | |
<ng-template #customHeader> | |
<p>custom</p> | |
</ng-template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HyperLife1119 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Custom Header feature for the Calendar component has been added.
What is the new behavior?
described above.
Does this PR introduce a breaking change?
Other information