chore: - simplified selectors for content and invoker
- mentioned accordion in changeset
This commit is contained in:
parent
49092c97aa
commit
71906ed316
2 changed files with 3 additions and 3 deletions
|
|
@ -2,4 +2,4 @@
|
|||
'@lion/ui': patch
|
||||
---
|
||||
|
||||
narrowed the scope of the selectors that query [slot=invoker] and [slot=content] to prevent that any nested elements with [slot=invoker] and [slot=content] are moved to slot=\_accordion as well
|
||||
`accordion`: narrowed the scope of the selectors that query [slot=invoker] and [slot=content] to prevent that any nested elements with [slot=invoker] and [slot=content] are moved to slot=\_accordion as well
|
||||
|
|
|
|||
|
|
@ -210,10 +210,10 @@ export class LionAccordion extends LitElement {
|
|||
*/
|
||||
__rearrangeInvokersAndContent() {
|
||||
const invokers = /** @type {HTMLElement[]} */ (
|
||||
Array.from(this.querySelectorAll(':scope > [slot="invoker"]'))
|
||||
Array.from(this.children).filter(child => child.slot === 'invoker')
|
||||
);
|
||||
const contents = /** @type {HTMLElement[]} */ (
|
||||
Array.from(this.querySelectorAll(':scope > [slot="content"]'))
|
||||
Array.from(this.children).filter(child => child.slot === 'content')
|
||||
);
|
||||
const accordion = this.shadowRoot?.querySelector('slot[name=_accordion]');
|
||||
if (accordion) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue