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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user