From d34d26125b52b77398a9ec66ac277e925c6a5f0e Mon Sep 17 00:00:00 2001 From: Dominik Henneke Date: Thu, 11 Feb 2021 11:47:13 +0100 Subject: [PATCH] Limit the props that are forwarded to the Link component in the EntityRefLink --- .changeset/ninety-lemons-shake.md | 5 +++++ .../src/components/EntityRefLink/EntityRefLink.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/ninety-lemons-shake.md diff --git a/.changeset/ninety-lemons-shake.md b/.changeset/ninety-lemons-shake.md new file mode 100644 index 0000000000..960a4eaffe --- /dev/null +++ b/.changeset/ninety-lemons-shake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Limit the props that are forwarded to the `Link` component in the `EntityRefLink`. diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx index 8aa890086e..50a80af12a 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLink.tsx @@ -32,7 +32,7 @@ type EntityRefLinkProps = { export const EntityRefLink = React.forwardRef( (props, ref) => { - const { entityRef, defaultKind, children } = props; + const { entityRef, defaultKind, children, ...linkProps } = props; let kind; let namespace; @@ -61,7 +61,7 @@ export const EntityRefLink = React.forwardRef( {children} {!children && formatEntityRefTitle(entityRef, { defaultKind })}