Skip to content

Commit d5ecf89

Browse files
committed
CFormInput modelValue = 0 (number) handled correctly
1 parent b85adb2 commit d5ecf89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/coreui-vue/src/components/form/CFormInput.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ const CFormInput = defineComponent({
188188
onInput: (event: InputEvent) => handleInput(event),
189189
readonly: props.readonly,
190190
type: props.type,
191-
...(props.modelValue && { value: props.modelValue }),
191+
...((props.modelValue || props.modelValue === 0) && { value: props.modelValue })
192192
},
193193
slots.default && slots.default(),
194194
),

0 commit comments

Comments
 (0)