mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: replace datamask with key from new key value api (#17680)
* afirst stage to ccheck to get initial datamask * clean up code and update typescript * remove consoles * fix ts and update copy dashboard url * use key when one doesn't exists * lint clean up * fix errors * add suggested changes * remove line * add tests and add changes for copydashboard * fix lint * fix lint * fix lint * Update superset-frontend/src/dashboard/components/Header/index.jsx Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * add timeout * fix test * fix test, add qs to cypress and add suggestions * add suggestions * fix lint * more suggested changes for backwards comapat * fix lint * cleanup naming and add qs parse to tests * Update superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * Update superset-frontend/src/dashboard/components/menu/ShareMenuItems/index.tsx Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * more changes and fix lint * remove nativefiler param * fix path * remove con * simplify logic Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2c3f39f3f2
commit
cfd851aa13
@@ -28,6 +28,9 @@ export function getUrlParam(param: UrlParam & { type: 'number' }): number;
|
||||
export function getUrlParam(param: UrlParam & { type: 'boolean' }): boolean;
|
||||
export function getUrlParam(param: UrlParam & { type: 'object' }): object;
|
||||
export function getUrlParam(param: UrlParam & { type: 'rison' }): object;
|
||||
export function getUrlParam(
|
||||
param: UrlParam & { type: 'rison | string' },
|
||||
): string | object;
|
||||
export function getUrlParam({ name, type }: UrlParam): unknown {
|
||||
const urlParam = new URLSearchParams(window.location.search).get(name);
|
||||
switch (type) {
|
||||
@@ -62,7 +65,7 @@ export function getUrlParam({ name, type }: UrlParam): unknown {
|
||||
try {
|
||||
return rison.decode(urlParam);
|
||||
} catch {
|
||||
return null;
|
||||
return urlParam;
|
||||
}
|
||||
default:
|
||||
return urlParam;
|
||||
|
||||
Reference in New Issue
Block a user