Skip to content

Commit

Permalink
clearing custom_width when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
fisjac committed Mar 18, 2024
1 parent ae29427 commit caa39ce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions superset-frontend/src/features/alerts/AlertReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,15 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({

const [isScreenshot, setIsScreenshot] = useState<boolean>(false);
useEffect(() => {
setIsScreenshot(
if (
contentType === 'dashboard' ||
(contentType === 'chart' && reportFormat === 'PNG'),
);
(contentType === 'chart' && reportFormat === 'PNG')
) {
setIsScreenshot(true);
} else {
setIsScreenshot(false);
onCustomWidthChange(null);
}
}, [contentType, reportFormat]);

// Dropdown options
Expand Down

0 comments on commit caa39ce

Please sign in to comment.