fix: deduplicate custom array id fields (#13064)

When adding a custom ID field to an array's config, both the default
field provided by Payload, and the custom ID field, exist in the
resulting config. This can lead to problems when the looking up the
field's config, where either one or the other will be returned.

Fixes #12978
This commit is contained in:
Patrik
2025-07-07 16:06:31 -04:00
committed by GitHub
parent ba660fdea2
commit e6f8ca6fd0
4 changed files with 48 additions and 1 deletions

View File

@@ -355,6 +355,12 @@ export interface ArrayField {
id?: string | null;
}[]
| null;
arrayWithCustomID?:
| {
id?: string | null;
text?: string | null;
}[]
| null;
updatedAt: string;
createdAt: string;
}
@@ -1977,6 +1983,12 @@ export interface ArrayFieldsSelect<T extends boolean = true> {
text?: T;
id?: T;
};
arrayWithCustomID?:
| T
| {
id?: T;
text?: T;
};
updatedAt?: T;
createdAt?: T;
}