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