Files
payload/test/admin/collections/CustomViews1.ts
2024-03-19 00:59:56 -04:00

25 lines
641 B
TypeScript

import type { CollectionConfig } from 'payload/types'
import { CustomEditView } from '../components/views/CustomEdit/index.js'
import { customViews1CollectionSlug } from '../slugs.js'
export const CustomViews1: CollectionConfig = {
slug: customViews1CollectionSlug,
admin: {
components: {
views: {
// This will override the entire Edit view including all nested views, i.e. `/edit/:id/*`
// To override one specific nested view, use the nested view's slug as the key
Edit: CustomEditView,
},
},
},
fields: [
{
name: 'title',
type: 'text',
},
],
versions: true,
}