Skip to content

Commit

Permalink
Fix: Cancel button disabled until active analysis selected
Browse files Browse the repository at this point in the history
Signed-off-by: MiriSafra <[email protected]>
  • Loading branch information
MiriSafra committed Sep 19, 2024
1 parent 3302462 commit 505282a
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -574,15 +574,14 @@ export const ApplicationsTable: React.FC = () => {
>
{t("actions.delete")}
</DropdownItem>,
...(tasksReadAccess &&
tasksWriteAccess &&
selectedRows.some((application: DecoratedApplication) =>
isTaskCancellable(application)
)
...(tasksReadAccess && tasksWriteAccess
? [
<DropdownItem
key="applications-bulk-cancel"
isDisabled={selectedRows.length < 1}
isDisabled={selectedRows.some(
(application: DecoratedApplication) =>
isTaskCancellable(application)
)}
onClick={() => {
handleCancelBulkAnalysis();
}}
Expand Down

0 comments on commit 505282a

Please sign in to comment.