@itfin/components 1.2.119 → 1.2.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -116,8 +116,15 @@ class itfMoneyField extends Vue {
|
|
|
116
116
|
return this.currencies.find(({ Id }) => this.currency.Id === Id);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
@Emit('input')
|
|
120
119
|
setValue (val) {
|
|
120
|
+
if (!isNumeric(val)) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
this.$emit('input', val);
|
|
124
|
+
|
|
125
|
+
function isNumeric(value) {
|
|
126
|
+
return /^-?\d+([\,\.]\d+)?$/.test(value);
|
|
127
|
+
}
|
|
121
128
|
}
|
|
122
129
|
}
|
|
123
130
|
</script>
|