Expose spinner part on tree item

pull/1937/head
mwalklandIDBS 2024-03-22 07:53:43 +00:00
rodzic 2a4b3ee2e9
commit e22b4eb492
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -46,6 +46,7 @@ import type { CSSResultGroup, PropertyValueMap } from 'lit';
* @csspart item--selected - Applied when the tree item is selected.
* @csspart indentation - The tree item's indentation container.
* @csspart expand-button - The container that wraps the tree item's expand button and spinner.
* @csspart spinner - The spinner that shows when a lazy tree item is in the loading state.
* @csspart label - The tree item's label.
* @csspart children - The container that wraps the tree item's nested children.
* @csspart checkbox - The checkbox that shows when using multiselect.
@ -257,7 +258,7 @@ export default class SlTreeItem extends ShoelaceElement {
})}
aria-hidden="true"
>
${when(this.loading, () => html` <sl-spinner></sl-spinner> `)}
${when(this.loading, () => html` <sl-spinner part="spinner"></sl-spinner> `)}
<slot class="tree-item__expand-icon-slot" name="expand-icon">
<sl-icon library="system" name=${isRtl ? 'chevron-left' : 'chevron-right'}></sl-icon>
</slot>