fix(ui): enable Table Row href to open in new tabs
The Table Row component's href prop was being destructured but not passed to the underlying ReactAriaRow component, preventing rows from rendering as <a> elements. This blocked native browser link behaviors like right-click "Open in new tab" and Cmd+Click. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/ui': patch
|
||||
---
|
||||
|
||||
Fixed Table Row component to properly support opening links in new tabs via right-click or Cmd+Click when using the href prop.
|
||||
@@ -57,6 +57,7 @@ export function Row<T extends object>(props: RowProps<T>) {
|
||||
return (
|
||||
<ReactAriaRow
|
||||
id={id}
|
||||
href={href}
|
||||
className={clsx(classNames.row, styles[classNames.row])}
|
||||
{...rest}
|
||||
>
|
||||
@@ -69,6 +70,7 @@ export function Row<T extends object>(props: RowProps<T>) {
|
||||
<RouterProvider navigate={navigate} useHref={useHref}>
|
||||
<ReactAriaRow
|
||||
id={id}
|
||||
href={href}
|
||||
className={clsx(classNames.row, styles[classNames.row])}
|
||||
data-react-aria-pressable="true"
|
||||
{...rest}
|
||||
|
||||
Reference in New Issue
Block a user