* Adds a check for the first tab and e2e test for custom ID * Add support for ids in any order inside an unnamed tab * Update tests for rows * Minor fixes and remove dead commented code
42 lines
846 B
TypeScript
42 lines
846 B
TypeScript
import type { CollectionConfig } from 'payload/dist/collections/config/types'
|
|
|
|
import { customIdCollectionSlug } from '../slugs'
|
|
|
|
export const CustomIdRow: CollectionConfig = {
|
|
slug: 'customIdRow',
|
|
labels: {
|
|
singular: 'Custom Id Row',
|
|
plural: 'Custom Ids Row',
|
|
},
|
|
admin: {
|
|
description: 'Description',
|
|
listSearchableFields: ['id', 'title', 'description', 'number'],
|
|
group: 'One',
|
|
useAsTitle: 'title',
|
|
defaultColumns: ['id', 'number', 'title'],
|
|
},
|
|
fields: [
|
|
{
|
|
type: 'row',
|
|
fields: [
|
|
{
|
|
name: 'title',
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'id',
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'description',
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'number',
|
|
type: 'number',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|