Files
payload/test/admin/collections/DisableCopyToLocale.ts
Jessica Chowdhury 657ad20278 feat(ui): adds disable copy to locale option to collection config (#11546)
### What?
Adds new option to disable the `copy to locale` button, adds description
to docs and adds e2e test.

### Why?
Client request.

### How?
The option can be used like this: 
```ts
// in collection config
  admin: {
    disableCopyToLocale: true,
  },
```
2025-03-07 12:48:08 +00:00

17 lines
304 B
TypeScript

import type { CollectionConfig } from 'payload'
import { disableCopyToLocale } from '../slugs.js'
export const DisableCopyToLocale: CollectionConfig = {
slug: disableCopyToLocale,
admin: {
disableCopyToLocale: true,
},
fields: [
{
name: 'title',
type: 'text',
},
],
}