Files
payload/test/admin/collections/With300Documents.ts
Germán Jabloñski 56667cdc8d fix(ui): fixed many bugs in the WhereBuilder relationship select menu (#10553)
Following https://github.com/payloadcms/payload/pull/10551, I found and
fixed a handful more bugs:

- When writing to the input, the results that were already there were
not cleaned, causing incorrect results to appear.
- the scroll was causing an infinite loop that showed repeated elements
- optimization: only the required field is selected (not required)
- refs are set to the initial value to avoid a state where nothing can
be searched
2025-01-20 16:14:49 -03:00

22 lines
404 B
TypeScript

import type { CollectionConfig } from 'payload'
import { with300DocumentsSlug } from '../slugs.js'
export const with300Documents: CollectionConfig = {
slug: with300DocumentsSlug,
admin: {
useAsTitle: 'text',
},
fields: [
{
name: 'text',
type: 'text',
},
{
name: 'selfRelation',
type: 'relationship',
relationTo: with300DocumentsSlug,
},
],
}