Skip to content

Commit

Permalink
fix: tabs order in pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Liu committed Feb 2, 2025
1 parent 9e5876d commit 61d4830
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions superset-frontend/src/features/alerts/AlertReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -826,11 +826,18 @@ 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,
);

if (allTabsWithOrder.length > 1) {
tabTree.push({
title: 'All Tabs',
// select tree only works with string value
value: JSON.stringify(allTabsWithOrder),
});
}

setTabOptions(tabTree);

const anchor = currentAlert?.extra?.dashboard?.anchor;
Expand Down

0 comments on commit 61d4830

Please sign in to comment.