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>
42 lines
689 B
TypeScript
42 lines
689 B
TypeScript
import type { CollectionConfig } from 'payload'
|
|
|
|
export const localiedSlug = 'localized'
|
|
|
|
export const LocalizedCollection: CollectionConfig = {
|
|
slug: localiedSlug,
|
|
admin: {
|
|
useAsTitle: 'text',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'text',
|
|
type: 'text',
|
|
localized: true,
|
|
},
|
|
{
|
|
name: 'number',
|
|
type: 'number',
|
|
localized: true,
|
|
},
|
|
{
|
|
name: 'number2',
|
|
type: 'number',
|
|
},
|
|
{
|
|
name: 'group',
|
|
type: 'group',
|
|
fields: [
|
|
{
|
|
name: 'text',
|
|
type: 'text',
|
|
},
|
|
{
|
|
name: 'number',
|
|
type: 'number',
|
|
localized: true,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|