Skip to content

Commit

Permalink
Merge pull request #1914 from noirbizarre/fix-form-events-bubbling
Browse files Browse the repository at this point in the history
Fix form events not bubbling (and harvester config being hidden)
  • Loading branch information
noirbizarre authored Oct 11, 2018
2 parents 1e2869f + d83384e commit 066f60f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions js/components/form/base-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions js/components/form/base-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 2 additions & 0 deletions js/components/harvest/form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 066f60f

Please sign in to comment.