@bagelink/vue 1.8.20 → 1.8.24
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/dist/components/ModalForm.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/NumberInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ModalForm.vue +0 -1
- package/src/components/form/inputs/NumberInput.vue +2 -1
package/package.json
CHANGED
|
@@ -70,7 +70,6 @@ defineExpose({ setFormValues })
|
|
|
70
70
|
v-if="visible" ref="form" v-model="formData" :schema="schema"
|
|
71
71
|
@update:modelValue="emit('update:modelValue', $event)" @submit="runSubmit"
|
|
72
72
|
/>
|
|
73
|
-
<pre>{{ formData }}</pre>
|
|
74
73
|
<template v-if="onDelete || onSubmit" #footer>
|
|
75
74
|
<div class="flex gap-0">
|
|
76
75
|
<Btn thin flat :value="cancelText || 'Cancel'" @click="closeModal" />
|
|
@@ -112,11 +112,12 @@ const formattedValue = ref('')
|
|
|
112
112
|
function inputHandler() {
|
|
113
113
|
const numeric = formattedValue.value.replace(/[^\d.-]/g, '')
|
|
114
114
|
const emptyValue = ['', '-', '.', '-.'].includes(numeric)
|
|
115
|
-
const isTypingDecimal =
|
|
115
|
+
const isTypingDecimal = numeric.endsWith('.')
|
|
116
116
|
const isTypingTrailingZeros = /\.\d*0$/.test(numeric) // Check if ending with decimal followed by digits ending in 0
|
|
117
117
|
|
|
118
118
|
if (emptyValue || isTypingDecimal || isTypingTrailingZeros) {
|
|
119
119
|
emit('update:modelValue', numeric === '-' ? '-' : numeric)
|
|
120
|
+
// Don't reformat while typing decimal values
|
|
120
121
|
return
|
|
121
122
|
}
|
|
122
123
|
|