Merge pull request #15 from Human-Connection/changes-for-editor

Improve input.js for editor use
This commit is contained in:
Grzegorz Leoniec 2019-02-24 20:14:32 +01:00 committed by GitHub
commit 47291993d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,12 +117,12 @@ export default {
}
},
created() {
if (this.$parentForm) {
if (this.$parentForm && this.model) {
this.$parentForm.subscribe(this.handleFormUpdate)
}
},
beforeDestroy() {
if (this.$parentForm) {
if (this.$parentForm && this.model) {
this.$parentForm.unsubscribe(this.handleFormUpdate)
}
},
@ -132,7 +132,7 @@ export default {
},
input(value) {
this.innerValue = value
if (this.$parentForm) {
if (this.$parentForm && this.model) {
this.$parentForm.update(this.model, value)
} else {
/**