We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b56117d commit 6024e9aCopy full SHA for 6024e9a
src/plugins/workspace/public/containers/workspace_dropdown_list/workspace_dropdown_list.tsx
@@ -57,13 +57,19 @@ export function WorkspaceDropdownList(props: WorkspaceDropdownListProps) {
57
/** switch the workspace */
58
setLoading(true);
59
const id = workspaceOption[0].key!;
60
- const newUrl = coreStart.workspaces?.formatUrlWithWorkspaceId(window.location.href, id);
+ const newUrl = coreStart.workspaces?.formatUrlWithWorkspaceId(
61
+ coreStart.application.getUrlForApp(WORKSPACE_APP_ID, {
62
+ path: PATHS.overview,
63
+ absolute: true,
64
+ }),
65
+ id
66
+ );
67
if (newUrl) {
68
window.location.href = newUrl;
69
}
70
setLoading(false);
71
},
- [coreStart.workspaces]
72
+ [coreStart.workspaces, coreStart.application]
73
);
74
75
const onCreateWorkspaceClick = () => {
0 commit comments