Skip to content
Snippets Groups Projects
Unverified Commit 489cb3c6 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Also use upload indicator for re-uploading files (#1)

parent a960f089
No related branches found
No related tags found
No related merge requests found
Pipeline #9681 passed with warnings
......@@ -78,7 +78,6 @@ class SignaturePdfUpload extends VPUSignatureLitElement {
*/
onFileUploadFinished(ev) {
if (ev.detail.status !== 201) {
console.log(ev.detail);
// this doesn't seem to trigger an update() execution
this.errorFiles[Math.floor(Math.random() * 1000000)] = ev.detail;
// this triggers the correct update() execution
......@@ -166,10 +165,12 @@ class SignaturePdfUpload extends VPUSignatureLitElement {
* @param file
* @param id
*/
fileUploadClickHandler(file, id) {
this._("#file-upload").uploadFile(file);
async fileUploadClickHandler(file, id) {
this.uploadInProgress = true;
this.errorFiles.splice(id, 1);
this.errorFilesCount--;
await this._("#file-upload").uploadFile(file);
this.uploadInProgress = false;
}
static get styles() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment