Skip to content

Commit

Permalink
Fix the relationship name not being passed to the inline relationship…
Browse files Browse the repository at this point in the history
… renderer (#6036)
  • Loading branch information
emmatown committed Jul 1, 2021
1 parent a7271ab commit 093f979
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-peaches-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/document-renderer': patch
---

Fixed the relationship name not being passed to the inline relationship renderer
2 changes: 2 additions & 0 deletions packages-next/document-renderer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ interface Renderers {
inline: {
link: Component<{ children: ReactNode; href: string }> | 'a';
relationship: Component<{
relationship: string;
data: { id: string; label: string; data: Record<string, any> } | null;
}>;
} & MarkRenderers;
Expand Down Expand Up @@ -185,6 +186,7 @@ function DocumentNode({
const data = node.data as any;
return (
<renderers.inline.relationship
relationship={node.relationship as string}
data={
data
? {
Expand Down

1 comment on commit 093f979

@vercel
Copy link

@vercel vercel bot commented on 093f979 Jul 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.