Files
payloadcms/test/admin/collections/Array.ts
Tobias Odendahl 78d3af7dc9 feat(ui): allow array fields to be filtered in list view (#11925)
### What?
Allows array fields to be filtered in the list view.

### Why?
Array fields were not filterable in the list view although all other
field types were filterable already.

### How?
Adds handling for array fields as filter option.


![image](https://github.com/user-attachments/assets/6df1a113-1d9f-4d50-92f7-d1fceed294d0)
2025-05-01 14:19:43 -04:00

20 lines
338 B
TypeScript

import type { CollectionConfig } from 'payload'
import { arrayCollectionSlug } from '../slugs.js'
export const Array: CollectionConfig = {
slug: arrayCollectionSlug,
fields: [
{
name: 'array',
type: 'array',
fields: [
{
name: 'text',
type: 'text',
},
],
},
],
}