From 0dd6331a520af64cba0a5b14e7830da5fdb3971a Mon Sep 17 00:00:00 2001 From: Forrest Li Date: Thu, 16 Jan 2020 16:22:37 -0500 Subject: [PATCH] fix(FileLoader): Correctly clear dialog contents on close --- src/components/core/FileLoader/script.js | 7 +++++++ src/components/core/FileLoader/template.html | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/core/FileLoader/script.js b/src/components/core/FileLoader/script.js index 78b7c51d..bb29f77c 100644 --- a/src/components/core/FileLoader/script.js +++ b/src/components/core/FileLoader/script.js @@ -62,6 +62,13 @@ export default { }, 10); }); }, + onDialogChange(state) { + if (!state) { + this.close(); + } else { + this.$emit('input', true); + } + }, close() { this.$emit('input', false); // hack to reset queue only after the file dialog closes diff --git a/src/components/core/FileLoader/template.html b/src/components/core/FileLoader/template.html index 216bef01..a344b919 100644 --- a/src/components/core/FileLoader/template.html +++ b/src/components/core/FileLoader/template.html @@ -1,9 +1,10 @@