Limit the props that are forwarded to the Link component in the EntityRefLink
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
Limit the props that are forwarded to the `Link` component in the `EntityRefLink`.
|
||||
@@ -32,7 +32,7 @@ type EntityRefLinkProps = {
|
||||
|
||||
export const EntityRefLink = React.forwardRef<any, EntityRefLinkProps>(
|
||||
(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<any, EntityRefLinkProps>(
|
||||
<Link
|
||||
ref={ref}
|
||||
to={generatePath(`/catalog/${entityRoute.path}`, routeParams)}
|
||||
{...props}
|
||||
{...linkProps}
|
||||
>
|
||||
{children}
|
||||
{!children && formatEntityRefTitle(entityRef, { defaultKind })}
|
||||
|
||||
Reference in New Issue
Block a user