Skip to content

Commit de8a762

Browse files
committed
Remove redirect to first workspace view
1 parent 202ca38 commit de8a762

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/packages/core/workspace/components/workspace-editor/workspace-editor.element.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {
7171
} as UmbRoute;
7272
});
7373

74-
newRoutes.push({
75-
path: '',
76-
redirectTo: newRoutes[0]?.path,
77-
});
78-
74+
newRoutes.push({ ...newRoutes[0], path: '' });
7975
}
8076

8177
newRoutes.push({
@@ -116,11 +112,12 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {
116112
${repeat(
117113
this._workspaceViews,
118114
(view) => view.alias,
119-
(view) => html`
115+
(view, index) => html`
120116
<uui-tab
121117
href="${this._routerPath}/view/${view.meta.pathname}"
122118
.label="${view.meta.label ? this.localize.string(view.meta.label) : view.name}"
123-
?active=${'view/' + view.meta.pathname === this._activePath}>
119+
?active=${'view/' + view.meta.pathname === this._activePath ||
120+
(index === 0 && this._activePath === '')}>
124121
<umb-icon slot="icon" name=${view.meta.icon}></umb-icon>
125122
${view.meta.label ? this.localize.string(view.meta.label) : view.name}
126123
</uui-tab>

0 commit comments

Comments
 (0)