Skip to content

Commit

Permalink
fix: Open pointer in new tab in data browser not working when mount p…
Browse files Browse the repository at this point in the history
…ath is not root (parse-community#2527)
  • Loading branch information
AshishBarvaliya committed Feb 18, 2024
1 parent 62efcd7 commit 2f4081f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ class Browser extends DashboardView {
},
]);
window.open(
generatePath(this.context, `browser/${className}?filters=${encodeURIComponent(filters)}`),
generatePath(this.context, `browser/${className}?filters=${encodeURIComponent(filters)}`, true),
'_blank'
);
}
Expand Down
7 changes: 6 additions & 1 deletion src/lib/generatePath.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export default function generatePath(currentApp, path) {
const MOUNT_PATH = window.PARSE_DASHBOARD_PATH;

export default function generatePath(currentApp, path, prependMountPath = false) {
if (prependMountPath && MOUNT_PATH) {
return `${MOUNT_PATH}apps/${currentApp.slug}/${path}`;
}
return `/apps/${currentApp.slug}/${path}`;
}

0 comments on commit 2f4081f

Please sign in to comment.