From c2816a14f4a78669930a044bf095ee3b5a62cb1b Mon Sep 17 00:00:00 2001 From: Lily Kuang Date: Thu, 16 Jun 2022 14:27:14 -0700 Subject: [PATCH 1/2] feat(embedded-sdk): enable CSV download --- superset-embedded-sdk/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-embedded-sdk/src/index.ts b/superset-embedded-sdk/src/index.ts index 32b02641e00d2..65062cf0c4a52 100644 --- a/superset-embedded-sdk/src/index.ts +++ b/superset-embedded-sdk/src/index.ts @@ -105,9 +105,10 @@ export async function embedDashboard({ iframe.sandbox.add("allow-scripts"); // obviously the iframe needs scripts iframe.sandbox.add("allow-presentation"); // for fullscreen charts iframe.sandbox.add("allow-downloads"); // for downloading charts as image + iframe.sandbox.add("allow-forms"); // for forms to submit + iframe.sandbox.add("allow-popups"); // for exporting charts as csv // add these ones if it turns out we need them: // iframe.sandbox.add("allow-top-navigation"); - // iframe.sandbox.add("allow-forms"); // add the event listener before setting src, to be 100% sure that we capture the load event iframe.addEventListener('load', () => { From 393bc011c0ed7a6473ce8e816c65d40a464465fe Mon Sep 17 00:00:00 2001 From: Lily Kuang Date: Thu, 16 Jun 2022 14:40:59 -0700 Subject: [PATCH 2/2] lint --- superset-embedded-sdk/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-embedded-sdk/src/index.ts b/superset-embedded-sdk/src/index.ts index 65062cf0c4a52..317195522c88d 100644 --- a/superset-embedded-sdk/src/index.ts +++ b/superset-embedded-sdk/src/index.ts @@ -106,7 +106,7 @@ export async function embedDashboard({ iframe.sandbox.add("allow-presentation"); // for fullscreen charts iframe.sandbox.add("allow-downloads"); // for downloading charts as image iframe.sandbox.add("allow-forms"); // for forms to submit - iframe.sandbox.add("allow-popups"); // for exporting charts as csv + iframe.sandbox.add("allow-popups"); // for exporting charts as csv // add these ones if it turns out we need them: // iframe.sandbox.add("allow-top-navigation");