fix last option select instead of empty label or any other option

eg. "shared by me" in Addressbook instead of "All contacts"
caused by this._inputNode not available when set_value was called
This commit is contained in:
ralf 2022-03-01 18:29:13 +02:00
parent c70886f106
commit 5ff96e7818

View File

@ -71,6 +71,12 @@ export class Et2Select extends Et2WidgetWithSelect
super.connectedCallback();
//MOVE options that were set as children inside SELECT:
this.querySelector('select').append(...this.querySelectorAll('option'));
// if _inputNode was not available by the time set_value() got called
if (this.getValue() !== this.modelValue)
{
this.set_value(this.modelValue);
}
}
/** @param {import('@lion/core').PropertyValues } changedProperties */