Skip to content

Commit

Permalink
Merge pull request #292 from Kitware/tweak-file-dialog
Browse files Browse the repository at this point in the history
fix(FileLoader): Correctly clear dialog contents on close
  • Loading branch information
floryst authored Jan 29, 2020
2 parents c01033d + 0dd6331 commit a39c448
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/components/core/FileLoader/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/components/core/FileLoader/template.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<v-dialog
width="50%"
width="70%"
:value="value"
:persistent="loading"
:fullscreen="$vuetify.breakpoint.smAndDown"
@input="$emit('input', $event)"
@input="onDialogChange"
@click:outside="close"
>
<v-card>
<v-card-text class="pa-0">
Expand Down

0 comments on commit a39c448

Please sign in to comment.