kopia lustrzana https://github.com/shoelace-style/shoelace
prettier
rodzic
418bd1c0d9
commit
005fbee2d7
|
@ -144,9 +144,9 @@ export default class SlTree extends ShoelaceElement {
|
|||
.forEach((status: 'expand' | 'collapse') => {
|
||||
const existingIcon = item.querySelector(`[slot="${status}-icon"]`);
|
||||
|
||||
const expandButtonIcon = this.getExpandButtonIcon(status)
|
||||
const expandButtonIcon = this.getExpandButtonIcon(status);
|
||||
|
||||
if (!expandButtonIcon) return
|
||||
if (!expandButtonIcon) return;
|
||||
|
||||
if (existingIcon === null) {
|
||||
// No separator exists, add one
|
||||
|
|
|
@ -753,7 +753,6 @@ describe('<sl-tree>', () => {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
// https://github.com/shoelace-style/shoelace/issues/1916
|
||||
it("Should not render 'null' if it can't find a custom icon", async () => {
|
||||
const tree = await fixture<SlTree>(html`
|
||||
|
@ -761,9 +760,7 @@ describe('<sl-tree>', () => {
|
|||
<sl-tree-item>
|
||||
Item 1
|
||||
<sl-icon name="1-circle" slot="expand-icon"></sl-icon>
|
||||
<sl-tree-item>
|
||||
Item A
|
||||
</sl-tree-item>
|
||||
<sl-tree-item> Item A </sl-tree-item>
|
||||
</sl-tree-item>
|
||||
<sl-tree-item>
|
||||
Item 2
|
||||
|
@ -776,8 +773,8 @@ describe('<sl-tree>', () => {
|
|||
<sl-tree-item>Item B</sl-tree-item>
|
||||
</sl-tree-item>
|
||||
</sl-tree>
|
||||
`)
|
||||
`);
|
||||
|
||||
expect(tree.textContent).to.not.includes("null")
|
||||
})
|
||||
expect(tree.textContent).to.not.includes('null');
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue