Show leaf path as title/tooltip

This commit is contained in:
nathan 2024-02-15 10:35:06 -07:00
parent ff4988b41e
commit bebd121b60
2 changed files with 2 additions and 0 deletions

View File

@ -470,6 +470,7 @@ export class Et2TreeDropdown extends Et2WidgetWithSelectMixin(LitElement)
tabindex="-1" tabindex="-1"
variant=${isValid ? nothing : "danger"} variant=${isValid ? nothing : "danger"}
size=${this.size || "medium"} size=${this.size || "medium"}
title=${option.path ?? option.title}
?removable=${!readonly} ?removable=${!readonly}
?readonly=${readonly} ?readonly=${readonly}
?editable=${isEditable} ?editable=${isEditable}

View File

@ -530,6 +530,7 @@ class Tree extends Etemplate\Widget
// 1D array // 1D array
$category = $cat + array( $category = $cat + array(
'text' => $s, 'text' => $s,
'path' => $categories->id2name($cat['id'], 'path'),
/* /*
These ones to play nice when a user puts a tree & a selectbox with the same These ones to play nice when a user puts a tree & a selectbox with the same