From dc7dc4d504b7f7293574ebb5cf63ec3a8f8ab91a Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 17 Sep 2024 10:02:42 +0200 Subject: [PATCH] don't return new modal dialogs if they're already defined 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. --- hub/static/js/explore.esm.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hub/static/js/explore.esm.js b/hub/static/js/explore.esm.js index 5ef06a5f..8c4e6af1 100644 --- a/hub/static/js/explore.esm.js +++ b/hub/static/js/explore.esm.js @@ -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() {