We are currently trying to implement a custom grid view for a media collection in addition to the standard list and edit views, but fail to configure it.
We have tried multiple different path configs, none of which seem to be respected.
const mediaCollectionWithViews = {
...mediaCollection,
admin: {
...mediaCollection.admin,
components: {
...mediaCollection.admin?.components,
views: {
...(mediaCollection.admin?.components?.views ?? {}),
grid: {
Component: '@maas/payload-plugin-media-cloud/components#GridView',
path: `/grid`,
exact: true,
},
},
},
},
}
We are currently trying to implement a custom grid view for a media collection in addition to the standard list and edit views, but fail to configure it.
We have tried multiple different path configs, none of which seem to be respected.
Sadly this is rather poorly documented and I also can’t find a working example anywhere. My suspicion is that this is somehow not possible. Maybe due to the code here: https://github.com/payloadcms/payload/blob/main/packages/next/src/views/Root/getRouteData.ts ?