Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork131
Closed as not planned
Description
Hello, I am using CFormCheck and have set the default value to an empty value. However, I am encountering an issue where no actions from CFormCheck seem to have any effect. Additionally, I noticed that when the default value is set to empty, CFormCheck automatically selects the last option. Is this behavior causing the issue?
When using a native input radio, if the default value is empty, none of the options should be selected. Is this not the expected behavior with CFormCheck?
I apologize as I am a beginner and couldn’t find any relevant discussions regarding this issue.
<template> <CRow> <CCol sm="6"> <!-- <input type="radio" name="payCondition" value="monthly" v-model="form.payCondition"/> <input type="radio" name="payCondition" value="immediate" v-model="form.payCondition"/> --> <CFormLabel>Pay Condition</CFormLabel> <CFormCheck type="radio" name="payCondition" label="test1" value="monthly" v-model="form.payCondition" /> <CFormCheck type="radio" name="payCondition" label="test2" value="immediate" v-model="form.payCondition" /> </CCol> <CCol sm="6" v-if="form.payCondition === 'monthly'"> <CFormLabel>Condition</CFormLabel> <CFormInput v-model="form.monthlyTerm" placeholder="testplcae" /> </CCol> </CRow></template><script setup>import { reactive} from 'vue';const form = reactive({ payCondition: ''})</script>
Metadata
Metadata
Assignees
Labels
No labels