### 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. 
20 lines
338 B
TypeScript
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',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|