mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Hopefully prevent double-bind of input change
Should fix addressbook contacts/organisation filter
This commit is contained in:
parent
ae700fb391
commit
00f7b51fbd
@ -110,9 +110,17 @@ const Et2InputWidgetMixin = (superclass) =>
|
|||||||
connectedCallback()
|
connectedCallback()
|
||||||
{
|
{
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
|
this._oldChange = this._oldChange.bind(this);
|
||||||
|
this.addEventListener("change", this._oldChange);
|
||||||
this.node = this.getInputNode();
|
this.node = this.getInputNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disconnectedCallback()
|
||||||
|
{
|
||||||
|
super.disconnectedCallback();
|
||||||
|
this.removeEventListener("change", this._oldChange);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A property has changed, and we want to make adjustments to other things
|
* A property has changed, and we want to make adjustments to other things
|
||||||
* based on that
|
* based on that
|
||||||
@ -144,12 +152,8 @@ const Et2InputWidgetMixin = (superclass) =>
|
|||||||
* @param _ev
|
* @param _ev
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
_onChange(_ev : Event) : boolean
|
_oldChange(_ev : Event) : boolean
|
||||||
{
|
{
|
||||||
if(typeof super._onChange == "function")
|
|
||||||
{
|
|
||||||
super._onChange(_ev);
|
|
||||||
}
|
|
||||||
if(typeof this.onchange == 'function')
|
if(typeof this.onchange == 'function')
|
||||||
{
|
{
|
||||||
// Make sure function gets a reference to the widget, splice it in as 2. argument if not
|
// Make sure function gets a reference to the widget, splice it in as 2. argument if not
|
||||||
|
@ -2185,6 +2185,10 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
|||||||
get_columns()
|
get_columns()
|
||||||
{
|
{
|
||||||
const colMgr = this.dataview.getColumnMgr();
|
const colMgr = this.dataview.getColumnMgr();
|
||||||
|
if(!colMgr)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
const visibility = colMgr.getColumnVisibilitySet();
|
const visibility = colMgr.getColumnVisibilitySet();
|
||||||
const colDisplay = [];
|
const colDisplay = [];
|
||||||
const custom_fields = [];
|
const custom_fields = [];
|
||||||
@ -3931,11 +3935,12 @@ export class et2_nextmatch_header_bar extends et2_DOMWidget implements et2_INext
|
|||||||
|
|
||||||
if(_widget.localName && window.customElements.get(_widget.localName) !== "undefined")
|
if(_widget.localName && window.customElements.get(_widget.localName) !== "undefined")
|
||||||
{
|
{
|
||||||
|
// We could use addEventListener(), but callbacks expect these arguments
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
_widget.onchange = (ev) =>
|
_widget.onchange = (ev) =>
|
||||||
{
|
{
|
||||||
return change.call(this, _widget, _widget);
|
return change.call(this, _widget, _widget);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user