Skip to content

Commit f2d56f9

Browse files
committed
fix: update decimal input to allow any step value and improve model value handling
1 parent 21649e0 commit f2d56f9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

adminforth/spa/src/components/ColumnValueInput.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@
9999
:fullWidth="true"
100100
:prefix="column.inputPrefix"
101101
:suffix="column.inputSuffix"
102+
:readonly="(column.editReadonly && source === 'edit') || readonly"
102103
:modelValue="value?.toString().replace(/(\.[0-9]*[1-9])0+$|\.0+$/, '$1')"
103-
@update:modelValue="$emit('update:modelValue', $event)"
104+
@update:modelValue="(val: string | number) => $emit('update:modelValue', val !== null ? String(val) : '')"
104105
/>
105106
<Input
106107
v-else-if="(type || column.type) === 'float'"

0 commit comments

Comments
 (0)