Et2TreeDropdown: Fix selecting the current value does not close dropdown

This commit is contained in:
nathan 2025-03-05 14:51:32 -07:00
parent 5b59b4ac5b
commit 1c8dfb7b2d

View File

@ -1050,8 +1050,12 @@ export class Et2TreeDropdown extends SearchMixin<Constructor<any> & Et2InputWidg
@blur=${this.handleInternalBlur}
@et2-click=${(e) =>
{
// Always hide the popup when a tree item is clicked
// this.hide();
// Hide the popup when a tree item is clicked
if(this._close_on_select || !this.multiple)
{
this.hasFocus = false;
this.hide();
}
}}
@keydown=${this.handleComboboxKeyDown}
@sl-selection-change=${this.handleTreeChange}