fix(input-datepicker): refactor unnamed slot to named content slot
unnamed slot is now removed, you have to use named slot="content" in order to pass content to the calendar overlay frame
This commit is contained in:
parent
ae30a30bc2
commit
f810a30103
2 changed files with 5 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { html, css, LitElement } from '@lion/core';
|
||||
import { css, html, LitElement } from '@lion/core';
|
||||
import { LocalizeMixin } from '@lion/localize';
|
||||
|
||||
export class LionCalendarOverlayFrame extends LocalizeMixin(LitElement) {
|
||||
|
|
@ -111,7 +111,7 @@ export class LionCalendarOverlayFrame extends LocalizeMixin(LitElement) {
|
|||
<slot name="close-icon">×</slot>
|
||||
</button>
|
||||
</div>
|
||||
<slot></slot>
|
||||
<slot name="content"></slot>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import '@lion/calendar/lion-calendar.js';
|
||||
import { html, ifDefined, render } from '@lion/core';
|
||||
import { LionInputDate } from '@lion/input-date';
|
||||
import { withModalDialogConfig, OverlayMixin } from '@lion/overlays';
|
||||
|
||||
import '@lion/calendar/lion-calendar.js';
|
||||
import { OverlayMixin, withModalDialogConfig } from '@lion/overlays';
|
||||
import './lion-calendar-overlay-frame.js';
|
||||
|
||||
/**
|
||||
|
|
@ -230,6 +229,7 @@ export class LionInputDatepicker extends OverlayMixin(LionInputDate) {
|
|||
_calendarTemplate() {
|
||||
return html`
|
||||
<lion-calendar
|
||||
slot="content"
|
||||
id="calendar"
|
||||
.selectedDate="${this.constructor.__getSyncDownValue(this.modelValue)}"
|
||||
.minDate="${this.__calendarMinDate}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue