From 62028d127335e5473bf4167d81978a732fe5d116 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Thu, 27 Aug 2020 13:56:55 +0530 Subject: [PATCH] Reset file input value after operations - fixed #1124 --- .../collections/import-export-collections.vue | 6 ++++-- .../environments/import-export-environment.vue | 6 ++++-- pages/doc.vue | 1 + pages/index.vue | 14 ++++++++------ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/components/collections/import-export-collections.vue b/components/collections/import-export-collections.vue index d68d8c618..924b62f9d 100644 --- a/components/collections/import-export-collections.vue +++ b/components/collections/import-export-collections.vue @@ -32,7 +32,7 @@ @@ -47,7 +47,7 @@ @@ -126,6 +126,7 @@ export default { this.syncToFBCollections() } reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]) + this.$refs.inputChooseFileToReplaceWith.value = "" }, importFromJSON() { let reader = new FileReader() @@ -147,6 +148,7 @@ export default { this.syncToFBCollections() } reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]) + this.$refs.inputChooseFileToImportFrom.value = "" }, exportJSON() { let text = this.collectionJson diff --git a/components/environments/import-export-environment.vue b/components/environments/import-export-environment.vue index 1a04d9eef..ce82b4d75 100644 --- a/components/environments/import-export-environment.vue +++ b/components/environments/import-export-environment.vue @@ -32,7 +32,7 @@ @@ -47,7 +47,7 @@ @@ -116,6 +116,7 @@ export default { reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]) this.fileImported() this.syncToFBEnvironments() + this.$refs.inputChooseFileToReplaceWith.value = "" }, importFromJSON() { let reader = new FileReader() @@ -133,6 +134,7 @@ export default { } reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]) this.syncToFBEnvironments() + this.$refs.inputChooseFileToImportFrom.value = "" }, importFromPostwoman(environments) { let confirmation = this.$t("file_imported") diff --git a/pages/doc.vue b/pages/doc.vue index 2b7779aed..f32ed3deb 100644 --- a/pages/doc.vue +++ b/pages/doc.vue @@ -354,6 +354,7 @@ export default { icon: "attach_file", }) } + this.$refs.collectionUpload.value = "" }, getDoc() { diff --git a/pages/index.vue b/pages/index.vue index a4010fd7e..799cc5f01 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -484,12 +484,12 @@ }) " > - - + + @@ -2570,6 +2570,7 @@ export default { icon: "attach_file", }) } + this.$refs.attachment.value = "" }, uploadPayload() { this.rawInput = true @@ -2588,6 +2589,7 @@ export default { icon: "attach_file", }) } + this.$refs.payload.value = "" }, async handleAccessTokenRequest() { if (this.oidcDiscoveryUrl === "" && (this.authUrl === "" || this.accessTokenUrl === "")) {