feat: add isSortable to arrays and blocks (#5962)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user