Content Type Designer: Always register root route to support drag-and-drop into empty Generic tab. (#20809)
Always register root route to enable drag-drop on empty Generic tab.
This commit is contained in:
@@ -207,15 +207,16 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
routes.push({
|
||||||
|
path: 'root',
|
||||||
|
component: () => import('./content-type-design-editor-tab.element.js'),
|
||||||
|
setup: (component) => {
|
||||||
|
this.#currentTabComponent = component as UmbContentTypeDesignEditorTabElement;
|
||||||
|
this.#currentTabComponent.containerId = null;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
if (this._hasRootGroups || this._tabs.length === 0) {
|
if (this._hasRootGroups || this._tabs.length === 0) {
|
||||||
routes.push({
|
|
||||||
path: 'root',
|
|
||||||
component: () => import('./content-type-design-editor-tab.element.js'),
|
|
||||||
setup: (component) => {
|
|
||||||
this.#currentTabComponent = component as UmbContentTypeDesignEditorTabElement;
|
|
||||||
this.#currentTabComponent.containerId = null;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
routes.push({
|
routes.push({
|
||||||
path: '',
|
path: '',
|
||||||
pathMatch: 'full',
|
pathMatch: 'full',
|
||||||
|
|||||||
Reference in New Issue
Block a user