feat: add isSortable to arrays and blocks (#5962)

This commit is contained in:
Kendell Joseph
2024-05-03 10:38:02 -04:00
committed by GitHub
parent 23f3eb1cf0
commit 5c58bd322d
16 changed files with 82 additions and 10 deletions

View File

@@ -155,6 +155,21 @@ const ArrayFields: CollectionConfig = {
minRows: 2,
type: 'array',
},
{
name: 'disableSortItems',
defaultValue: arrayDefaultValue,
admin: {
isSortable: false,
},
fields: [
{
name: 'text',
required: true,
type: 'text',
},
],
type: 'array',
},
],
slug: arrayFieldsSlug,
versions: true,

View File

@@ -63,4 +63,15 @@ export const anotherArrayDoc: Partial<ArrayField> = {
text: 'second row',
},
],
disableSortItems: [
{
text: 'un-sortable item 1',
},
{
text: 'un-sortable item 2',
},
{
text: 'un-sortable item 3',
},
],
}