From 4a78821fc658e1896306b6e04d7032c100256d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Busso?= <90727999+agustinbusso@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:53:53 -0300 Subject: [PATCH 1/2] Fix issue to re render file upload due to an issue with simple-uploader --- src/components/renderer/file-upload.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/renderer/file-upload.vue b/src/components/renderer/file-upload.vue index 11d29e092..26c4bc220 100644 --- a/src/components/renderer/file-upload.vue +++ b/src/components/renderer/file-upload.vue @@ -5,7 +5,7 @@ {{ $t('File uploads are unavailable in preview mode.') }} this.listenRemovedLoop(loop, removed)); + + window.ProcessMaker.EventBus.$on("modal-shown", () => { + this.clearFiles(); + }); this.removeDefaultClasses(); @@ -297,9 +301,16 @@ export default { nativeFiles: {}, uploading: false, invalidFile: false, + showComponent: false, }; }, methods: { + clearFiles() { + this.showComponent = false; + this.$nextTick(() => { + this.showComponent = true; + }); + }, uploaderLoaded() { return this.$refs['uploader']; }, From 93bf4b18d1569a38b06c6f17cf1a5e4b4ddcbd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Busso?= <90727999+agustinbusso@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:04:17 -0300 Subject: [PATCH 2/2] Set default value for showComponent to true --- src/components/renderer/file-upload.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/renderer/file-upload.vue b/src/components/renderer/file-upload.vue index 26c4bc220..65f34009a 100644 --- a/src/components/renderer/file-upload.vue +++ b/src/components/renderer/file-upload.vue @@ -301,7 +301,7 @@ export default { nativeFiles: {}, uploading: false, invalidFile: false, - showComponent: false, + showComponent: true, }; }, methods: {