@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.8.20",
4
+ "version": "1.8.24",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -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 = formattedValue.value.endsWith('.')
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