fix(ui): bulk upload losing state when adding additional files (#12946)

Fixes an issue where adding additional upload files would clear the
state of the originally uploaded files.
This commit is contained in:
Jarrod Flesch
2025-06-26 15:23:38 -04:00
committed by GitHub
parent 67fa5a0b3b
commit d62d9b4b8e
8 changed files with 122 additions and 72 deletions

View File

@@ -4,6 +4,7 @@ export type State = {
activeIndex: number
forms: {
errorCount: number
formID: string
formState: FormState
uploadEdits?: UploadEdits
}[]
@@ -49,6 +50,7 @@ export function formsManagementReducer(state: State, action: Action): State {
for (let i = 0; i < action.files.length; i++) {
newForms[i] = {
errorCount: 0,
formID: crypto.randomUUID(),
formState: {
...(action.initialState || {}),
file: {