@afeefa/vue-app 0.0.148 → 0.0.149

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 0.0.148
1
+ 0.0.149
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.148",
3
+ "version": "0.0.149",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -74,7 +74,7 @@ export default class EditForm extends Vue {
74
74
  * Using the created() method would result in already having set
75
75
  * the default date, hence not detecting a valid "change" anymore.
76
76
  *
77
- * comment 14.12. -> this should not be necessary if components do not alter models
77
+ * comment 14.12.22 -> this should not be necessary if components do not alter models
78
78
  */
79
79
  // @Watch('modelToEdit', {immediate: true})
80
80
  // @Watch('modelToEdit')
@@ -42,7 +42,7 @@
42
42
  :changed="changed"
43
43
  :valid="valid"
44
44
  angular
45
- :has="{reset: !!modelToEdit.id}"
45
+ :has="{reset: reset && !!modelToEdit.id}"
46
46
  @save="$emit('save', modelToEdit, ignoreChangesOnClose, close)"
47
47
  @reset="$refs.form.reset()"
48
48
  />
@@ -60,7 +60,7 @@ import { Component, Vue, Watch } from '@a-vue'
60
60
  import { DialogEvent } from '@a-vue/events'
61
61
 
62
62
  @Component({
63
- props: ['model', 'createModelToEdit', 'show']
63
+ props: ['model', 'createModelToEdit', 'show', {reset: true}]
64
64
  })
65
65
  export default class EditModal extends Vue {
66
66
  show_ = false
@@ -43,7 +43,6 @@ import { DialogEvent } from '@a-vue/events'
43
43
  })
44
44
  export default class EditPage extends Vue {
45
45
  unregisterRouterHook = null
46
- ignoreChangesOnRouteChange_ = false
47
46
 
48
47
  created () {
49
48
  this.unregisterRouterHook = this.$router.beforeEach(async (to, from, next) => {
@@ -70,9 +69,7 @@ export default class EditPage extends Vue {
70
69
  * hook to allow to leave a just created (saved) model
71
70
  */
72
71
  ignoreChangesOnRouteChange () {
73
- // this.$refs.form.forceUnchanged()
74
- console.info('TODO switch form to forceUnchanged')
75
- this.ignoreChangesOnRouteChange_ = true
72
+ this.$refs.form.forceUnchanged()
76
73
  }
77
74
  }
78
75
  </script>