mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Don't die if CustomFilterHeader is for a component that isn't a webcomponent, just error & use a select
This commit is contained in:
parent
c403edc49a
commit
39ab880188
@ -58,6 +58,11 @@ export class Et2CustomFilterHeader extends FilterMixin(Et2InputWidget(LitElement
|
|||||||
this.widgetType = "et2-" + this.widgetType;
|
this.widgetType = "et2-" + this.widgetType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!window.customElements.get(this.widgetType))
|
||||||
|
{
|
||||||
|
console.error("Unknown widget type '%s'", this.widgetType);
|
||||||
|
this.widgetType = 'et2-select';
|
||||||
|
}
|
||||||
// @ts-ignore TS doesn't know about this.getParent()
|
// @ts-ignore TS doesn't know about this.getParent()
|
||||||
this.filter_node = <LitElement>loadWebComponent(this.widgetType, {...attrs, ...this.widgetOptions}, this);
|
this.filter_node = <LitElement>loadWebComponent(this.widgetType, {...attrs, ...this.widgetOptions}, this);
|
||||||
if(this.filter_node instanceof Et2Select)
|
if(this.filter_node instanceof Et2Select)
|
||||||
|
Loading…
Reference in New Issue
Block a user