mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-14 03:54:29 +01:00
Remove block_change_event
It doesn't seem to be needed now, and is actually stopping the first user change from firing (change alarm time in calendar edit)
This commit is contained in:
parent
5601897dbb
commit
735b52b38b
@ -64,7 +64,6 @@ export class Et2WidgetWithSelect extends RowLimitedMixin(Et2WidgetWithSelectMixi
|
||||
// @ts-ignore SlSelect styles is a single CSSResult, not an array, so TS complains
|
||||
export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
{
|
||||
private _block_change_event : boolean = false;
|
||||
static get styles()
|
||||
{
|
||||
return [
|
||||
@ -298,14 +297,10 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
|
||||
_triggerChange(e)
|
||||
{
|
||||
if(super._triggerChange(e) && !this._block_change_event)
|
||||
if(super._triggerChange(e))
|
||||
{
|
||||
this.dispatchEvent(new Event("change", {bubbles: true}));
|
||||
}
|
||||
if(this._block_change_event)
|
||||
{
|
||||
this.updateComplete.then(() => this._block_change_event = false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -366,7 +361,6 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
{
|
||||
let oldValue = this.value;
|
||||
this.value = this.emptyLabel ? "" : "" + this.select_options[0]?.value;
|
||||
this._block_change_event = (oldValue != this.value);
|
||||
// ""+ to cast value of 0 to "0", to not replace with ""
|
||||
this.requestUpdate("value", oldValue);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user