@afeefa/vue-app 0.0.141 → 0.0.143
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.143
|
package/package.json
CHANGED
@@ -90,11 +90,18 @@ export default class ATextField extends Mixins(ComponentWidthMixin) {
|
|
90
90
|
if (this.clearable) {
|
91
91
|
// empty value if value exists
|
92
92
|
if (this.internalValue) {
|
93
|
-
event.stopPropagation()
|
93
|
+
event.stopPropagation() // break propagation chain, do not close popups e.g.
|
94
94
|
}
|
95
95
|
this.setInternalValue('')
|
96
|
+
|
96
97
|
this.$emit('input:internal', '')
|
97
|
-
|
98
|
+
|
99
|
+
if (this.debounceInputFunction) {
|
100
|
+
this.debounceInputFunction(this.internalValue)
|
101
|
+
} else {
|
102
|
+
this.$emit('input', this.emptyModelValue)
|
103
|
+
}
|
104
|
+
|
98
105
|
this.$emit('clear')
|
99
106
|
}
|
100
107
|
}
|
@@ -109,7 +116,7 @@ export default class ATextField extends Mixins(ComponentWidthMixin) {
|
|
109
116
|
|
110
117
|
const value = this.textFieldValueToModelValue()
|
111
118
|
|
112
|
-
// NaN means: wrong numerical value AND no validator present
|
119
|
+
// value === NaN means: wrong numerical value AND no validator present
|
113
120
|
// otherwise validator would return validate() -> false
|
114
121
|
if (Number.isNaN(value)) {
|
115
122
|
return
|
@@ -64,7 +64,6 @@ import { DialogEvent } from '@a-vue/events'
|
|
64
64
|
})
|
65
65
|
export default class EditModal extends Vue {
|
66
66
|
show_ = false
|
67
|
-
ignoreChangesOnClose_ = false
|
68
67
|
|
69
68
|
created () {
|
70
69
|
if (!this.model && !this.createModelToEdit) {
|
@@ -109,7 +108,7 @@ export default class EditModal extends Vue {
|
|
109
108
|
|
110
109
|
async beforeClose () {
|
111
110
|
// run only if show_ is true to prevent double checks with a-modal
|
112
|
-
if (this.show_ && this.$refs.form.changed
|
111
|
+
if (this.show_ && this.$refs.form.changed) {
|
113
112
|
const result = await this.$events.dispatch(new DialogEvent(DialogEvent.SHOW, {
|
114
113
|
title: 'Änderungen verwerfen?',
|
115
114
|
message: 'Im Formular sind nicht gespeicherte Änderungen. Sollen diese verworfen werden?',
|
@@ -136,9 +135,7 @@ export default class EditModal extends Vue {
|
|
136
135
|
* hook to allow to leave a just created (saved) model
|
137
136
|
*/
|
138
137
|
ignoreChangesOnClose () {
|
139
|
-
|
140
|
-
console.info('TODO switch form to forceUnchanged')
|
141
|
-
this.ignoreChangesOnClose_ = true
|
138
|
+
this.$refs.form.forceUnchanged()
|
142
139
|
}
|
143
140
|
}
|
144
141
|
</script>
|
package/src-admin/styles.scss
CHANGED