### 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`.
18 lines
317 B
TypeScript
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,
|
|
},
|
|
],
|
|
}
|