fix: server-generated ID for base ID field is overriden on the client

This commit is contained in:
Alessio Gravili
2024-03-27 11:42:08 -04:00
parent d144af6d8e
commit 80d290e178

View File

@@ -114,7 +114,7 @@ export function fieldReducer(state: FormState, action: FieldAction): FormState {
const withNewRow = [...(state[path]?.rows || [])]
const newRow: Row = {
id: new ObjectId().toHexString(),
id: (subFieldState?.id.value as string) || new ObjectId().toHexString(),
blockType: blockType || undefined,
collapsed: false,
}