File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed
Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -268,14 +268,20 @@ const PostList = () => (
268268 render= {({ data, isPending }) => (
269269 <>
270270 {! isPending &&
271- data .map ({ title, author_id }) => (
272- < div>
273- < h3> {title}< / h3>
274- < ReferenceFieldBase source= " author_id" reference= " authors" >
275- < AuthorView / >
276- < / ReferenceFieldBase>
277- < / div>
278- )}
271+ data .map (author => (
272+ < RecordContextProvider
273+ value= {author}
274+ key= {author .id }
275+ >
276+ < div>
277+ < h3> {author .title }< / h3>
278+ < ReferenceFieldBase source= " author_id" reference= " authors" >
279+ < AuthorView / >
280+ < / ReferenceFieldBase>
281+ < / div>
282+ < / RecordContextProvider>
283+ ))
284+ }
279285 < / >
280286 )}
281287 / >
Original file line number Diff line number Diff line change @@ -80,10 +80,10 @@ export const PostList = () => (
8080 render= {({ data, isPending }) => (
8181 <>
8282 {! isPending &&
83- data .map (author => (
83+ data .map (record => (
8484 < RecordContextProvider
85- value= {author }
86- key= {author .id }
85+ value= {record }
86+ key= {record .id }
8787 >
8888 < ReferenceManyFieldBase reference= " comments" target= " post_id" >
8989 < CustomAuthorView source= " name" / >
You can’t perform that action at this time.
0 commit comments