From b3ad928bb8590fb7cb3d90bfc267c3a69bc21e6a Mon Sep 17 00:00:00 2001 From: Johan Persson Date: Fri, 21 Nov 2025 15:26:39 +0100 Subject: [PATCH] fix(ui): handle Table Row without href prop correctly Fixed the Table Row component to properly handle cases where no href is provided. This prevents unnecessary RouterProvider wrapping and fixes the cursor incorrectly appearing as a pointer when the row is not actually a link. Signed-off-by: Johan Persson --- .changeset/famous-jars-lose.md | 5 +++++ packages/ui/src/components/Table/components/Row.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/famous-jars-lose.md diff --git a/.changeset/famous-jars-lose.md b/.changeset/famous-jars-lose.md new file mode 100644 index 0000000000..444b78630a --- /dev/null +++ b/.changeset/famous-jars-lose.md @@ -0,0 +1,5 @@ +--- +'@backstage/ui': patch +--- + +Fixed Table Row component to correctly handle cases where no href is provided, preventing unnecessary router provider wrapping and fixing the cursor incorrectly showing as a pointer despite the element not being a link. diff --git a/packages/ui/src/components/Table/components/Row.tsx b/packages/ui/src/components/Table/components/Row.tsx index 106f97baff..0b09c157ab 100644 --- a/packages/ui/src/components/Table/components/Row.tsx +++ b/packages/ui/src/components/Table/components/Row.tsx @@ -51,7 +51,7 @@ export function Row(props: RowProps) { ); - if (isExternal) { + if (!href || isExternal) { return (