Support Join query in filterOptions #8936
Replies: 3 comments 2 replies
-
I'm making sure I understand this correctly. You want to be able to configure I can see how that could be useful. Is that right? |
Beta Was this translation helpful? Give feedback.
-
@DanRibbens I replied in #8973 (comment) {
type: 'upload',
name: 'gallery',
relationTo: 'media',
filterOptions: async (args: FilterOptionsProps<PublicTopic>) => {
'use server'
return { belongToTopic: { equals: args.data.topicEntity } }
},
}, While author flow is to select the topicEntity and then all media is filtered by media which has a join field belongToTopic |
Beta Was this translation helpful? Give feedback.
-
Joins are great , yet many of the usages of joins are not possible today due to the fact that we can't use join fields with filterOptions.
filterOptions eventually use Rest API which supports join , so we need to add to filterOptions the capability to filter by join as we have in the rest API.
See:
https://discord.com/channels/967097582721572934/1300760003250094103
https://discord.com/channels/967097582721572934/1300810327574708346
Beta Was this translation helpful? Give feedback.
All reactions