Skip to content

Commit

Permalink
misc updaet
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed May 31, 2024
1 parent 2774b58 commit 8c6f29f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions static/coffee/main/react/edit_submission.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down

0 comments on commit 8c6f29f

Please sign in to comment.