mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(dashboard): copy permalink to dashboard chart (#19772)
* fix(dashboard): copy permalink to dashboard chart * lint * address comments
This commit is contained in:
@@ -154,11 +154,15 @@ export function getChartPermalink(
|
||||
});
|
||||
}
|
||||
|
||||
export function getDashboardPermalink(
|
||||
dashboardId: string,
|
||||
filterState: JsonObject,
|
||||
hash?: string,
|
||||
) {
|
||||
export function getDashboardPermalink({
|
||||
dashboardId,
|
||||
filterState,
|
||||
hash, // the anchor part of the link which corresponds to the tab/chart id
|
||||
}: {
|
||||
dashboardId: string | number;
|
||||
filterState: JsonObject;
|
||||
hash?: string;
|
||||
}) {
|
||||
// only encode filter box state if non-empty
|
||||
return getPermalink(`/api/v1/dashboard/${dashboardId}/permalink`, {
|
||||
filterState,
|
||||
|
||||
Reference in New Issue
Block a user