unable to use query giving error #3368
Replies: 1 comment
-
Have you already tried something like the following? Don't think you need to reference the ID there: const field = {
type: "relationship",
relationTo: "categoriessubitem",
name: "child",
admin: {
position: "sidebar",
},
hasMany: false,
filterOptions: ({ data }) => {
return {
"parent": {
equals: data?.categoriesitem.id // or data?.categoriesitem
},
};
},
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
{
type: "relationship",
relationTo: "categoriessubitem",
name: "child",
admin: {
position: "sidebar",
},
hasMany: false,
filterOptions: ({ data }) => {
console.log("hjk", data);
return {
'parent.id': { equals: data?.categoriesitem },
};
},
},
Beta Was this translation helpful? Give feedback.
All reactions