From 452650c03ad99ad45ab8c9d929f84f38f0426100 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:21:51 -0500 Subject: [PATCH] My device page: Fix 'show details' to open software details modal (#26771) --- changes/26617-show-device-software-details | 1 + frontend/components/ViewAllHostsLink/ViewAllHostsLink.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changes/26617-show-device-software-details diff --git a/changes/26617-show-device-software-details b/changes/26617-show-device-software-details new file mode 100644 index 0000000000..f7bab3f025 --- /dev/null +++ b/changes/26617-show-device-software-details @@ -0,0 +1 @@ +- My device page > Software > Software table: Fixed clicking "Show details" to open the software details modal diff --git a/frontend/components/ViewAllHostsLink/ViewAllHostsLink.tsx b/frontend/components/ViewAllHostsLink/ViewAllHostsLink.tsx index 6fe25c7d91..626af3aa14 100644 --- a/frontend/components/ViewAllHostsLink/ViewAllHostsLink.tsx +++ b/frontend/components/ViewAllHostsLink/ViewAllHostsLink.tsx @@ -18,7 +18,7 @@ interface IHostLinkProps { customText?: string; /** Table links shows on row hover and tab focus only */ rowHover?: boolean; - // don't actually create a link, useful when click is handled by an ancestor + /** Don't actually create a link, useful when click is handled by an ancestor */ noLink?: boolean; } @@ -51,7 +51,9 @@ const ViewAllHostsLink = ({ className={viewAllHostsLinkClass} to={noLink ? "" : path} onClick={(e) => { - e.stopPropagation(); // Allows for link to be clickable in a clickable row + if (!noLink) { + e.stopPropagation(); // Allows for link to have different onClick behavior than the row's onClick behavior + } }} onKeyDown={(e) => { if (e.key === "Enter") {