@afeefa/vue-app 0.0.208 → 0.0.209

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 0.0.208
1
+ 0.0.209
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.208",
3
+ "version": "0.0.209",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -40,12 +40,12 @@
40
40
  </v-btn>
41
41
 
42
42
  <edit-form-buttons
43
- :changed="changed"
43
+ :changed="changed || _changed"
44
44
  :valid="validFromOutside && valid"
45
45
  angular
46
46
  :has="{reset: reset && !!modelToEdit.id}"
47
47
  @save="$emit('save', modelToEdit, ignoreChangesOnClose, close)"
48
- @reset="$refs.form.reset()"
48
+ @reset="resetForm"
49
49
  />
50
50
  </a-row>
51
51
  </template>
@@ -61,11 +61,15 @@ import { Component, Vue, Watch } from '@a-vue'
61
61
  import { DialogEvent } from '@a-vue/events'
62
62
 
63
63
  @Component({
64
- props: ['model', 'createModelToEdit', 'show', {reset: true, valid: true}]
64
+ props: ['model', 'createModelToEdit', 'show', {reset: true, valid: true, changed: false}]
65
65
  })
66
66
  export default class EditModal extends Vue {
67
67
  show_ = false
68
68
 
69
+ get _changed () {
70
+ return this.changed
71
+ }
72
+
69
73
  created () {
70
74
  if (!this.model && !this.createModelToEdit) {
71
75
  console.warn('You need to pass either a model or a model factory to <edit-modal>.')
@@ -146,5 +150,10 @@ export default class EditModal extends Vue {
146
150
  resetChanged () {
147
151
  this.$refs.form.resetChanged()
148
152
  }
153
+
154
+ resetForm () {
155
+ this.$refs.form.reset()
156
+ this.$emit('reset')
157
+ }
149
158
  }
150
159
  </script>