Fix addressbook contact type filter was sometimes 'D' after being initialized to 'n'

When nextmatch moved the template in the DOM, we were re-adding already existing options which re-set the value.
This commit is contained in:
nathan 2022-04-01 11:12:19 -06:00
parent 4e488d7f5a
commit 0c8824c496

View File

@ -80,10 +80,15 @@ export class Et2Select extends Et2InvokerMixin(Et2WidgetWithSelect)
{
super.connectedCallback();
//MOVE options that were set as children inside SELECT:
this.querySelector('select').append(...this.querySelectorAll('option'));
//this.querySelector('select').append(...this.querySelectorAll('option'));
}
firstUpdated(changedProperties)
{
super.firstUpdated(changedProperties);
// if _inputNode was not available by the time set_value() got called
if(this.getValue() !== this.modelValue)
if(this.getValue() !== this.value)
{
this.set_value(this.modelValue);
}