From 8c6f29f21efadf8d45c1603d110f3c1b6f710a2f Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Thu, 30 May 2024 23:09:38 -0700 Subject: [PATCH] misc updaet --- static/coffee/main/react/edit_submission.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/coffee/main/react/edit_submission.coffee b/static/coffee/main/react/edit_submission.coffee index 12fe591..5b3ce18 100644 --- a/static/coffee/main/react/edit_submission.coffee +++ b/static/coffee/main/react/edit_submission.coffee @@ -232,10 +232,12 @@ export Uploader = P "Uploader", { upload_manager: new UploaderManager @props.uploader_opts } - # TODO: remove the use of forceUpdate push_upload: (upload) -> - @state.uploads.push upload - @forceUpdate() + @setState { + uploads: @state.uploads.concat(upload) + } + + # TODO: remove the use of forceUpdate upload.on_update = => @forceUpdate() handle_upload: (e) ->