Skip to content

Commit

Permalink
Bulk select export button successfully implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams committed Apr 1, 2021
1 parent 9cb76c9 commit 892462a
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,17 +444,23 @@ function SavedQueryList({
onConfirm={handleBulkQueryDelete}
>
{confirmDelete => {
const bulkActions: ListViewProps['bulkActions'] = canDelete
? [
{
key: 'delete',
name: t('Delete'),
onSelect: confirmDelete,
type: 'danger',
},
]
: [];

const bulkActions: ListViewProps['bulkActions'] = [];
if (canDelete) {
bulkActions.push({
key: 'delete',
name: t('Delete'),
onSelect: confirmDelete,
type: 'danger',
});
}
if (canExport) {
bulkActions.push({
key: 'export',
name: t('Export'),
type: 'primary',
onSelect: handleBulkDashboardExport,
});
}
return (
<ListView<SavedQueryObject>
className="saved_query-list-view"
Expand Down

0 comments on commit 892462a

Please sign in to comment.