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`.
This commit is contained in:
committed by
GitHub
parent
a65289c211
commit
9e97319c6f
@@ -70,6 +70,7 @@ export interface Config {
|
||||
'blocks-fields': BlocksField;
|
||||
'nested-arrays': NestedArray;
|
||||
'nested-field-tables': NestedFieldTable;
|
||||
'localized-drafts': LocalizedDraft;
|
||||
users: User;
|
||||
'localized-posts': LocalizedPost;
|
||||
'no-localized-fields': NoLocalizedField;
|
||||
@@ -94,6 +95,7 @@ export interface Config {
|
||||
'blocks-fields': BlocksFieldsSelect<false> | BlocksFieldsSelect<true>;
|
||||
'nested-arrays': NestedArraysSelect<false> | NestedArraysSelect<true>;
|
||||
'nested-field-tables': NestedFieldTablesSelect<false> | NestedFieldTablesSelect<true>;
|
||||
'localized-drafts': LocalizedDraftsSelect<false> | LocalizedDraftsSelect<true>;
|
||||
users: UsersSelect<false> | UsersSelect<true>;
|
||||
'localized-posts': LocalizedPostsSelect<false> | LocalizedPostsSelect<true>;
|
||||
'no-localized-fields': NoLocalizedFieldsSelect<false> | NoLocalizedFieldsSelect<true>;
|
||||
@@ -316,6 +318,17 @@ export interface NestedFieldTable {
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "localized-drafts".
|
||||
*/
|
||||
export interface LocalizedDraft {
|
||||
id: string;
|
||||
title?: string | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
_status?: ('draft' | 'published') | null;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "users".
|
||||
@@ -695,6 +708,10 @@ export interface PayloadLockedDocument {
|
||||
relationTo: 'nested-field-tables';
|
||||
value: string | NestedFieldTable;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'localized-drafts';
|
||||
value: string | LocalizedDraft;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'users';
|
||||
value: string | User;
|
||||
@@ -924,6 +941,16 @@ export interface NestedFieldTablesSelect<T extends boolean = true> {
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "localized-drafts_select".
|
||||
*/
|
||||
export interface LocalizedDraftsSelect<T extends boolean = true> {
|
||||
title?: T;
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
_status?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "users_select".
|
||||
|
||||
Reference in New Issue
Block a user