Skip to content

Commit

Permalink
don't return new modal dialogs if they're already defined
Browse files Browse the repository at this point in the history
In theory I think vue should keep track of this but there's some sort of
interaction that happens which means it can lose track of the dialog which
means that e.g dialog.hide() does not work. To avoid this check for an
existing dialog and return that if so then return that, otherwise create
a new one.
  • Loading branch information
struan committed Sep 17, 2024
1 parent 31d10d5 commit dc7dc4d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hub/static/js/explore.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,15 @@ const app = createApp({
},
computed: {
datasetModal() {
if (this.datasetModal) {
return this.datasetModal
}
return new Modal(this.$refs.datasetModal)
},
areaTypeModal() {
if (this.areaTypeModal) {
return this.areaTypeModal
}
return new Modal(this.$refs.areaTypeModal)
},
selectableDatasets() {
Expand Down

0 comments on commit dc7dc4d

Please sign in to comment.