### What? The `in` & `not_in` operators were not properly working for `text` fields as this operator requires an array of values for it's input. ### How? Conditionally renders a multi select input for `text` fields when filtering by `in` & `not_in` operators.
18 lines
500 B
TypeScript
18 lines
500 B
TypeScript
import type { RequiredDataFromCollection } from 'payload'
|
|
|
|
import type { TextField } from '../../payload-types.js'
|
|
|
|
export const defaultText = 'default-text'
|
|
export const textFieldsSlug = 'text-fields'
|
|
|
|
export const textDoc: RequiredDataFromCollection<TextField> = {
|
|
text: 'Seeded text document',
|
|
localizedText: 'Localized text',
|
|
hasMany: ['one', 'two'],
|
|
}
|
|
|
|
export const anotherTextDoc: RequiredDataFromCollection<TextField> = {
|
|
text: 'Another text document',
|
|
hasMany: ['three', 'four'],
|
|
}
|