Skip to content

Commit 2f4081f

Browse files
fix: Open pointer in new tab in data browser not working when mount path is not root (#2527)
1 parent 62efcd7 commit 2f4081f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/dashboard/Data/Browser/Browser.react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ class Browser extends DashboardView {
10301030
},
10311031
]);
10321032
window.open(
1033-
generatePath(this.context, `browser/${className}?filters=${encodeURIComponent(filters)}`),
1033+
generatePath(this.context, `browser/${className}?filters=${encodeURIComponent(filters)}`, true),
10341034
'_blank'
10351035
);
10361036
}

src/lib/generatePath.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
export default function generatePath(currentApp, path) {
1+
const MOUNT_PATH = window.PARSE_DASHBOARD_PATH;
2+
3+
export default function generatePath(currentApp, path, prependMountPath = false) {
4+
if (prependMountPath && MOUNT_PATH) {
5+
return `${MOUNT_PATH}apps/${currentApp.slug}/${path}`;
6+
}
27
return `/apps/${currentApp.slug}/${path}`;
38
}

0 commit comments

Comments
 (0)