feat: allow SlotRerenderObject to to first render on connectedCallback via firstRenderOnConnected
This commit is contained in:
parent
21a4ef5452
commit
8b90d52064
2 changed files with 9 additions and 3 deletions
5
.changeset/funny-numbers-prove.md
Normal file
5
.changeset/funny-numbers-prove.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/ui': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: allow SlotRerenderObject to first render on connectedCallback via `firstRenderOnConnected`
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import sinon from 'sinon';
|
import sinon from 'sinon';
|
||||||
import { defineCE, expect, fixture, fixtureSync, unsafeStatic, html } from '@open-wc/testing';
|
import { defineCE, expect, fixture, fixtureSync, unsafeStatic, html } from '@open-wc/testing';
|
||||||
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
// @ts-expect-error
|
||||||
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
|
||||||
import { SlotMixin } from '@lion/ui/core.js';
|
import { SlotMixin } from '@lion/ui/core.js';
|
||||||
import { LitElement } from 'lit';
|
import { LitElement } from 'lit';
|
||||||
|
|
||||||
|
|
@ -511,10 +512,10 @@ describe('SlotMixin', () => {
|
||||||
class ScopedEl extends LitElement {}
|
class ScopedEl extends LitElement {}
|
||||||
|
|
||||||
const tagName = defineCE(
|
const tagName = defineCE(
|
||||||
|
// @ts-ignore
|
||||||
class extends ScopedElementsMixin(SlotMixin(LitElement)) {
|
class extends ScopedElementsMixin(SlotMixin(LitElement)) {
|
||||||
static get scopedElements() {
|
static get scopedElements() {
|
||||||
return {
|
return {
|
||||||
// @ts-expect-error
|
|
||||||
...super.scopedElements,
|
...super.scopedElements,
|
||||||
'scoped-elm': ScopedEl,
|
'scoped-elm': ScopedEl,
|
||||||
};
|
};
|
||||||
|
|
@ -547,10 +548,10 @@ describe('SlotMixin', () => {
|
||||||
class ScopedEl extends LitElement {}
|
class ScopedEl extends LitElement {}
|
||||||
|
|
||||||
const tagName = defineCE(
|
const tagName = defineCE(
|
||||||
|
// @ts-expect-error
|
||||||
class extends ScopedElementsMixin(SlotMixin(LitElement)) {
|
class extends ScopedElementsMixin(SlotMixin(LitElement)) {
|
||||||
static get scopedElements() {
|
static get scopedElements() {
|
||||||
return {
|
return {
|
||||||
// @ts-expect-error
|
|
||||||
...super.scopedElements,
|
...super.scopedElements,
|
||||||
'scoped-el': ScopedEl,
|
'scoped-el': ScopedEl,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue