Skip to content

Commit

Permalink
✨ Applications: No tooltip when no selections
Browse files Browse the repository at this point in the history
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
  • Loading branch information
gildub committed Jul 10, 2023
1 parent 3a085a6 commit 10de0d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,24 +455,18 @@ export const ApplicationsTableAnalyze: React.FC = () => {
? [
<ConditionalTooltip
key="delete-app-tooltip"
isTooltipEnabled={
selectedRows.length < 1 ||
selectedRows.some(
(application) => application.migrationWave !== null
)
}
isTooltipEnabled={selectedRows.some(
(application) => application.migrationWave !== null
)}
content={
"Cannot delete application(s) assigned to migration wave(s)."
}
>
<DropdownItem
key="applications-bulk-delete"
isDisabled={
selectedRows.length < 1 ||
selectedRows.some(
(application) => application.migrationWave !== null
)
}
isDisabled={selectedRows.some(
(application) => application.migrationWave !== null
)}
onClick={() => {
openBulkDeleteModal(selectedRows);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,24 +631,18 @@ export const ApplicationsTable: React.FC = () => {
? [
<ConditionalTooltip
key="delete-app-tooltip"
isTooltipEnabled={
selectedRows.length < 1 ||
selectedRows.some(
(application) => application.migrationWave !== null
)
}
isTooltipEnabled={selectedRows.some(
(application) => application.migrationWave !== null
)}
content={
"Cannot delete application(s) assigned to migration wave(s)."
}
>
<DropdownItem
key="applications-bulk-delete"
isDisabled={
selectedRows.length < 1 ||
selectedRows.some(
(application) => application.migrationWave !== null
)
}
isDisabled={selectedRows.some(
(application) => application.migrationWave !== null
)}
onClick={() => {
openBulkDeleteModal(selectedRows);
}}
Expand Down

0 comments on commit 10de0d2

Please sign in to comment.