if a custom element is not added to the manifest we will render a default tree navigator element

This commit is contained in:
Mads Rasmussen
2022-12-19 10:10:25 +01:00
parent 27338571df
commit f9f1124a86

View File

@@ -30,6 +30,12 @@ export class UmbTreeExtension extends LitElement {
private async _createElement() {
if (!this.tree) return;
// If the manifest doesn't specify a custom element, we will render a default tree element
if (!this.tree.elementName && !this.tree.js && !this.tree.loader) {
this._element = document.createElement('umb-tree-navigator');
return;
}
try {
this._element = (await createExtensionElement(this.tree)) as any | undefined;
if (!this._element) return;