Skip to content

Commit

Permalink
Rename prop
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronPlave committed Feb 3, 2025
1 parent 2def8bf commit eff39ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/components/ui/DataGrid/DataGridActions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
placement: Placement;
};
export let cancellable: boolean = true;
export let isDownloadCancellable: boolean = true;
export let editButtonClass: string | undefined = undefined;
export let editTooltip: Tooltip | undefined = undefined;
export let deleteButtonClass: string | undefined = undefined;
Expand Down Expand Up @@ -69,7 +69,7 @@
}
function onCancelDownload() {
if (cancellable) {
if (isDownloadCancellable) {
downloadAbortController?.abort();
downloadAbortController = null;
downloadProgress = null;
Expand Down Expand Up @@ -120,9 +120,9 @@
class:icon={true}
class={downloadButtonClass}
on:click|stopPropagation={onCancelDownload}
use:tooltip={{ ...downloadTooltip, content: cancellable ? `Cancel ${downloadTooltip?.content}` : '' }}
use:tooltip={{ ...downloadTooltip, content: isDownloadCancellable ? `Cancel ${downloadTooltip?.content}` : '' }}
>
{#if cancellable}
{#if isDownloadCancellable}
<CancellableProgressRadial progress={downloadProgress} />
{:else}
<ProgressRadial progress={downloadProgress} strokeWidth={1} />
Expand Down
2 changes: 1 addition & 1 deletion src/routes/plans/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@
actionsDiv.className = 'actions-cell';
new DataGridActions({
props: {
cancellable: false,
deleteCallback: params.deletePlan,
deleteTooltip: {
content: 'Delete Plan',
Expand All @@ -309,6 +308,7 @@
content: 'Export Plan',
placement: 'bottom',
},
isDownloadCancellable: true,
useExportIcon: true,
hasDeletePermission: params.data && user ? featurePermissions.plan.canDelete(user, params.data) : false,
rowData: params.data,
Expand Down

0 comments on commit eff39ba

Please sign in to comment.