forked from extern/egroupware
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;
|
||||
}
|
||||
}
|
||||
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()
|
||||
this.filter_node = <LitElement>loadWebComponent(this.widgetType, {...attrs, ...this.widgetOptions}, this);
|
||||
if(this.filter_node instanceof Et2Select)
|
||||
|
Loading…
Reference in New Issue
Block a user