feat: relationship sortOptions property (#4301)
* feat: adds sortOptions property to relationship field * chore: fix lexical int tests * feat: simplifies logic & updates joi schema definition * feat: revert to default when searching in relationship select * fix types and joi schema * type adjustments --------- Co-authored-by: Alessio Gravili <alessio@bonfireleads.com> Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
This commit is contained in:
@@ -10,6 +10,11 @@ const ArrayFields: CollectionConfig = {
|
||||
enableRichTextLink: false,
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'title',
|
||||
type: 'text',
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
name: 'items',
|
||||
defaultValue: arrayDefaultValue,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { ArrayField } from '../../payload-types'
|
||||
|
||||
export const arrayDoc: Partial<ArrayField> = {
|
||||
title: 'array doc 1',
|
||||
items: [
|
||||
{
|
||||
text: 'first row',
|
||||
@@ -35,3 +36,31 @@ export const arrayDoc: Partial<ArrayField> = {
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export const anotherArrayDoc: Partial<ArrayField> = {
|
||||
title: 'array doc 2',
|
||||
items: [
|
||||
{
|
||||
text: 'first row',
|
||||
},
|
||||
{
|
||||
text: 'second row',
|
||||
},
|
||||
{
|
||||
text: 'third row',
|
||||
},
|
||||
],
|
||||
collapsedArray: [
|
||||
{
|
||||
text: 'initialize collapsed',
|
||||
},
|
||||
],
|
||||
arrayWithMinRows: [
|
||||
{
|
||||
text: 'first row',
|
||||
},
|
||||
{
|
||||
text: 'second row',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user