From ba7a5583edecc0c52abb7bc7253b9915ec7e910f Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Thu, 2 Nov 2023 17:08:18 -0700 Subject: [PATCH] fix(core): reference links not opening correct pane (#5116) --- .../form/inputs/ReferenceInput/ReferenceLinkCard.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx index af3f579daea..b8caa5532a6 100644 --- a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx +++ b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx @@ -29,14 +29,7 @@ export const ReferenceLinkCard = forwardRef(function ReferenceLinkCard( props: ReferenceLinkCardProps & React.HTMLProps, ref: React.ForwardedRef, ) { - const { - as: asProp, - // We exclude `documentId` from spread props to avoid passing it to the Card component - // eslint-disable-next-line @typescript-eslint/no-unused-vars - documentId, - documentType, - ...cardProps - } = props + const {as: asProp, documentId, documentType, ...cardProps} = props const dataAs = documentType ? 'a' : undefined // If the child link is clicked without a document type, an error will be thrown. @@ -48,6 +41,7 @@ export const ReferenceLinkCard = forwardRef(function ReferenceLinkCard( }