fix(ui): addFieldRow set modified (#9324)

Fixes #9264. When externally updating array or block rows through the
`addFieldRow` or `replaceFieldRow` methods, nested rich text fields
along with any custom components within them are never rendered. This is
because unless the form is explicitly set to modified, as the default
array and blocks fields currently do, the newly generated form-state
will skip the rendering step. Now, the underlying callbacks themselves
automatically set the form to modified to trigger rendering.
This commit is contained in:
Jacob Fletcher
2024-11-19 08:52:50 -05:00
committed by GitHub
parent a50029f659
commit 0f3f6e73da
9 changed files with 93 additions and 10 deletions

View File

@@ -465,6 +465,11 @@ export interface ArrayField {
id?: string | null;
}[]
| null;
externallyUpdatedArray?:
| {
id?: string | null;
}[]
| null;
updatedAt: string;
createdAt: string;
}
@@ -2084,6 +2089,13 @@ export interface ArrayFieldsSelect<T extends boolean = true> {
};
id?: T;
};
externallyUpdatedArray?:
| T
| {
customField?: T;
id?: T;
};
ui?: T;
updatedAt?: T;
createdAt?: T;
}
@@ -3400,6 +3412,6 @@ export interface Auth {
declare module 'payload' {
// @ts-ignore
// @ts-ignore
export interface GeneratedTypes extends Config {}
}
}