eschutho commented on code in PR #30888: URL: https://github.com/apache/superset/pull/30888#discussion_r1942039432
########## superset-frontend/src/features/alerts/AlertReportModal.tsx: ########## @@ -826,11 +826,19 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({ }) .then(response => { const { tab_tree: tabTree, all_tabs: allTabs } = response.json.result; - tabTree.push({ - title: 'All Tabs', - // select tree only works with string value - value: JSON.stringify(Object.keys(allTabs)), - }); + const allTabsWithOrder = tabTree.map( + (tab: { value: string }) => tab.value, + ); + + // Only show all tabs when there are more than one tab + if (allTabsWithOrder.length > 1) { + tabTree.push({ + title: 'All Tabs', + // select tree only works with string value + value: JSON.stringify(allTabsWithOrder), + }); + } Review Comment: @US579 will this change affect the pdf generation as well or just the dropdown ui in the modal? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org