mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Fix spinner when <wa-tree-item> is lazy loaded (#1786)
* fix spinner when lazy; closes #1678 * remove redundant entry
This commit is contained in:
@@ -13,16 +13,15 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
|
||||
|
||||
## Next
|
||||
|
||||
- 🚨 BREAKING: Changed `appearance="filled outlined"` to `appearance="filled-outlined"` in `<wa-card>` [issue:1671]
|
||||
- Fixed a bug in `<wa-slider>` that caused some touch devices to end up with the incorrect value [issue:1703]
|
||||
- Fixed a bug in `<wa-card>` that prevented some slots from being detected correctly [discuss:1450]
|
||||
- Fixed a bug in `<wa-tree-item>` that caused the spinner to not show when lazy loading [issue:1678]
|
||||
- Fixed a bug in `<wa-dropdown>` that caused the browser to hang when cancelling the `wa-hide` event [issue:1483]
|
||||
- Improved performance of `<wa-icon>` so initial rendering occurs faster, especially with multiple icons on the page [issue:1729]
|
||||
|
||||
## 3.0.0
|
||||
|
||||
- 🚨 BREAKING: Changed `appearance="filled outlined"` to `appearance="filled-outlined"` in the following elements [issue:1127]
|
||||
- `<wa-badge>`
|
||||
- `<wa-button>`
|
||||
- `<wa-callout>`
|
||||
- `<wa-card>`
|
||||
|
||||
@@ -73,12 +73,16 @@ slot:not([name])::slotted(wa-icon) {
|
||||
rotate: -90deg;
|
||||
}
|
||||
|
||||
.tree-item-expanded slot[name='expand-icon'],
|
||||
.tree-item-expanded:not(.tree-item-loading) slot[name='expand-icon'],
|
||||
.tree-item:not(.tree-item-expanded) slot[name='collapse-icon'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tree-item:not(.tree-item-has-expand-button) .expand-icon-slot {
|
||||
.tree-item:not(.tree-item-has-expand-button):not(.tree-item-loading) .expand-icon-slot {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tree-item-loading .expand-icon-slot wa-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ export default class WaTreeItem extends WebAwesomeElement {
|
||||
'tree-item-expanded': this.expanded,
|
||||
'tree-item-selected': this.selected,
|
||||
'tree-item-leaf': this.isLeaf,
|
||||
'tree-item-loading': this.loading,
|
||||
'tree-item-has-expand-button': showExpandButton,
|
||||
})}"
|
||||
>
|
||||
@@ -272,8 +273,10 @@ export default class WaTreeItem extends WebAwesomeElement {
|
||||
${when(
|
||||
this.loading,
|
||||
() => html` <wa-spinner part="spinner" exportparts="base:spinner__base"></wa-spinner> `,
|
||||
)}
|
||||
() => html`
|
||||
<wa-icon name=${isRtl ? 'chevron-left' : 'chevron-right'} library="system" variant="solid"></wa-icon>
|
||||
`,
|
||||
)}
|
||||
</slot>
|
||||
<slot class="expand-icon-slot" name="collapse-icon">
|
||||
<wa-icon name=${isRtl ? 'chevron-left' : 'chevron-right'} library="system" variant="solid"></wa-icon>
|
||||
|
||||
Reference in New Issue
Block a user