This change adds support for sort with multiple fields in local API and REST API. Related discussion #2089 Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
28 lines
421 B
TypeScript
28 lines
421 B
TypeScript
import type { CollectionConfig } from 'payload'
|
|
|
|
export const draftsSlug = 'drafts'
|
|
|
|
export const DraftsCollection: CollectionConfig = {
|
|
slug: draftsSlug,
|
|
admin: {
|
|
useAsTitle: 'text',
|
|
},
|
|
versions: {
|
|
drafts: true,
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'text',
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'number',
|
|
type: 'number',
|
|
},
|
|
{
|
|
name: 'number2',
|
|
type: 'number',
|
|
},
|
|
],
|
|
}
|