This is an automated email from the ASF dual-hosted git repository. machristie pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/develop by this push: new 2d317274 AIRAVATA-3628 Fix updating resourceHostId in store 2d317274 is described below commit 2d317274b3925b33d8926d2f72d47206a25cf198 Author: Marcus Christie <machris...@apache.org> AuthorDate: Wed Jun 15 17:42:21 2022 -0400 AIRAVATA-3628 Fix updating resourceHostId in store Also fixes dispatching only a custom input event --- .../js/web-components/ComputeResourceSelector.vue | 3 ++- .../ExperimentComputeResourceSelector.vue | 30 +++++++++++++++------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ComputeResourceSelector.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ComputeResourceSelector.vue index e15dc262..b1c52fdb 100644 --- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ComputeResourceSelector.vue +++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ComputeResourceSelector.vue @@ -6,6 +6,7 @@ :options="computeResourceOptions" required @input="computeResourceChanged" + @input.native.stop :disabled="disabled || computeResourceOptions.length === 0" > <template slot="first"> @@ -34,7 +35,7 @@ export default { disabled: { type: Boolean, default: false, - } + }, }, store: store, data() { diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue index f216b7d3..7f047775 100644 --- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue +++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/web-components/ExperimentComputeResourceSelector.vue @@ -1,9 +1,12 @@ <template> - <compute-resource-selector - :value="resourceHostId" :disabled="disabled" - :includedComputeResources="computeResources" - @input.stop="computeResourceChanged" - /> + <div> + <compute-resource-selector + :value="resourceHostId" + :disabled="disabled" + :includedComputeResources="computeResources" + @input.native.stop="computeResourceChanged" + /> + </div> </template> <script> @@ -25,7 +28,7 @@ export default { disabled: { type: Boolean, default: false, - } + }, }, created() { this.$store.dispatch("initializeComputeResources", { @@ -47,17 +50,26 @@ export default { }, methods: { computeResourceChanged(event) { - const [computeResourceId] = event.detail; + const [resourceHostId] = event.detail; this.$store.dispatch("updateComputeResourceHostId", { - computeResourceId, + resourceHostId, + }); + this.emitValueChanged(resourceHostId); + }, + emitValueChanged(resourceHostId) { + const inputEvent = new CustomEvent("input", { + detail: [resourceHostId], + composed: true, + bubbles: true, }); + this.$el.dispatchEvent(inputEvent); }, }, watch: { value(value) { if (value && value !== this.resourceHostId) { this.$store.dispatch("updateComputeResourceHostId", { - computeResourceId: value, + resourceHostId: value, }); } },