diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx index 65020aeabf1c9..416f47a4ab9f6 100644 --- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx +++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx @@ -516,10 +516,11 @@ const AlertReportModal: FunctionComponent = ({ } }); + const shouldEnableForceScreenshot = contentType === 'chart' && !isReport; const data: any = { ...currentAlert, type: isReport ? 'Report' : 'Alert', - force_screenshot: forceScreenshot ? 'true' : 'false', + force_screenshot: shouldEnableForceScreenshot || forceScreenshot, validator_type: conditionNotNull ? 'not null' : 'operator', validator_config_json: conditionNotNull ? {} @@ -862,6 +863,8 @@ const AlertReportModal: FunctionComponent = ({ const onContentTypeChange = (event: any) => { const { target } = event; + // When switch content type, reset force_screenshot to false + setForceScreenshot(false); // Gives time to close the select before changing the type setTimeout(() => setContentType(target.value), 200); };