feat: allow SlotRerenderObject to to first render on connectedCallback via firstRenderOnConnected

This commit is contained in:
Thijs Louisse 2024-03-15 13:14:01 +01:00
parent 21a4ef5452
commit 8b90d52064
2 changed files with 9 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@lion/ui': patch
---
feat: allow SlotRerenderObject to first render on connectedCallback via `firstRenderOnConnected`

View file

@ -1,6 +1,7 @@
import sinon from 'sinon';
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 { LitElement } from 'lit';
@ -511,10 +512,10 @@ describe('SlotMixin', () => {
class ScopedEl extends LitElement {}
const tagName = defineCE(
// @ts-ignore
class extends ScopedElementsMixin(SlotMixin(LitElement)) {
static get scopedElements() {
return {
// @ts-expect-error
...super.scopedElements,
'scoped-elm': ScopedEl,
};
@ -547,10 +548,10 @@ describe('SlotMixin', () => {
class ScopedEl extends LitElement {}
const tagName = defineCE(
// @ts-expect-error
class extends ScopedElementsMixin(SlotMixin(LitElement)) {
static get scopedElements() {
return {
// @ts-expect-error
...super.scopedElements,
'scoped-el': ScopedEl,
};