From d83384ea338783078cff626b01b78889ce26c075 Mon Sep 17 00:00:00 2001 From: Axel Haustant Date: Thu, 11 Oct 2018 16:15:21 +0200 Subject: [PATCH] Fix form events not bubbling (and harvester config being hidden) --- CHANGELOG.md | 3 ++- js/components/form/base-field.js | 1 + js/components/form/base-form.js | 1 + js/components/harvest/form.vue | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f29799bc44..8bceffbedd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## Current (in progress) - Allows arguments and keyword arguments in the task `@connect` decorator [#1908](https://github.com/opendatateam/udata/pull/1908) -- Allow to restore assets after being deleted.( Datasets, Organizations and Reuses) [#1901](https://github.com/opendatateam/udata/pull/1901) +- Allows to restore assets after being deleted (Datasets, Organizations and Reuses) [#1901](https://github.com/opendatateam/udata/pull/1901) +- Fixes form events not bubbling (and so fixes harvester config not displaying) [#1914](https://github.com/opendatateam/udata/pull/1914) ## 1.6.0 (2018-10-02) diff --git a/js/components/form/base-field.js b/js/components/form/base-field.js index e3921743e3..1f27122ed4 100644 --- a/js/components/form/base-field.js +++ b/js/components/form/base-field.js @@ -48,6 +48,7 @@ export const BaseField = { events: { 'field:value-change': function(value) { this.$dispatch('field:change', this, value); + return true; // Let the event continue its bubbling } }, props: { diff --git a/js/components/form/base-form.js b/js/components/form/base-form.js index 11f1242a0d..22e5088e04 100644 --- a/js/components/form/base-form.js +++ b/js/components/form/base-form.js @@ -85,6 +85,7 @@ export default { events: { 'field:change': function(field, value) { this.$dispatch('form:change', this, field, value); + return true; // Let the event continue its bubbling } }, computed: { diff --git a/js/components/harvest/form.vue b/js/components/harvest/form.vue index 702c692788..8806f6109e 100644 --- a/js/components/harvest/form.vue +++ b/js/components/harvest/form.vue @@ -56,11 +56,13 @@ export default { if (field.field.id == 'backend') { this.backendValue = value; } + return true; // Let the event continue its bubbling }, 'form:change': function(form) { if (form.validate()) { this.$dispatch('harvest:source:form:changed', this.serialize()); } + return true; // Let the event continue its bubbling } }, computed: {