Files
payload/test/localization/collections/LocalizedDrafts/index.ts
Jessica Chowdhury 9e97319c6f fix(ui): locale selector in versions view should remove filtered locales (#11447)
### What?
The `locale selector` in the version comparison view shows all locales
on first load. It does not accomodate the `filterAvailableLocales`
option and shows locales which should be filtered.

### How?
Pass the initial locales through the `filterAvailableLocales` function.

Closes #11408

#### Testing
Use test suite `localization` and the `localized-drafts` collection.
Test added to `test/localization/e2e`.
2025-02-28 17:37:07 +00:00

18 lines
317 B
TypeScript

import type { CollectionConfig } from 'payload'
import { localizedDraftsSlug } from '../../shared.js'
export const LocalizedDrafts: CollectionConfig = {
slug: localizedDraftsSlug,
versions: {
drafts: true,
},
fields: [
{
type: 'text',
name: 'title',
localized: true,
},
],
}