diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index d9fee364ed..9f9a9f9628 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -141,11 +141,26 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) ::part(expand-button) { padding: 0; } - `, - css` - ::part(label):hover { + + /* Stop icon from shrinking if there's not enough space */ + + sl-tree-item sl-icon { + flex: 0 0 1em; + } + + ::part(label) { + overflow: hidden; + } + + ::part(label):hover { text-decoration: underline; } + + .tree-item__label { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } ` ] } @@ -622,7 +637,7 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) return html` - ${selectOption.text} + ${selectOption.text} ${selectOption.item ? repeat(selectOption.item, this._optionTemplate) : nothing} ` }