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';
|
import { LocalizeMixin } from '@lion/localize';
|
||||||
|
|
||||||
export class LionCalendarOverlayFrame extends LocalizeMixin(LitElement) {
|
export class LionCalendarOverlayFrame extends LocalizeMixin(LitElement) {
|
||||||
|
|
@ -111,7 +111,7 @@ export class LionCalendarOverlayFrame extends LocalizeMixin(LitElement) {
|
||||||
<slot name="close-icon">×</slot>
|
<slot name="close-icon">×</slot>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot name="content"></slot>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
|
import '@lion/calendar/lion-calendar.js';
|
||||||
import { html, ifDefined, render } from '@lion/core';
|
import { html, ifDefined, render } from '@lion/core';
|
||||||
import { LionInputDate } from '@lion/input-date';
|
import { LionInputDate } from '@lion/input-date';
|
||||||
import { withModalDialogConfig, OverlayMixin } from '@lion/overlays';
|
import { OverlayMixin, withModalDialogConfig } from '@lion/overlays';
|
||||||
|
|
||||||
import '@lion/calendar/lion-calendar.js';
|
|
||||||
import './lion-calendar-overlay-frame.js';
|
import './lion-calendar-overlay-frame.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -230,6 +229,7 @@ export class LionInputDatepicker extends OverlayMixin(LionInputDate) {
|
||||||
_calendarTemplate() {
|
_calendarTemplate() {
|
||||||
return html`
|
return html`
|
||||||
<lion-calendar
|
<lion-calendar
|
||||||
|
slot="content"
|
||||||
id="calendar"
|
id="calendar"
|
||||||
.selectedDate="${this.constructor.__getSyncDownValue(this.modelValue)}"
|
.selectedDate="${this.constructor.__getSyncDownValue(this.modelValue)}"
|
||||||
.minDate="${this.__calendarMinDate}"
|
.minDate="${this.__calendarMinDate}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue