-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
true-value and false-value are ignored on initial render #2694
Comments
I opened a PR,but I found that |
@edison1105 yes, that's normal. With sets and arrays, there should be a value attribute instead |
Got it,Thanks~ |
Hi @posva |
I think 48f00c0 is not fix this bug. We should assign <div id="app">
<label>model {{ model }}</label>
<input type="checkbox" v-model="model" :true-value="11" :false-value="22" />
</div>
<script>
const { ref,createApp } = Vue
createApp({
name: "App",
setup() {
const model = ref(false);
return {
model,
};
},
}).mount('#app')
</script> After first render,the model value is still And my PR is make it works fine. |
Hi @posva @yyx990803 |
This actually has nothing to do with |
OK |
Version
3.0.3
Reproduction link
https://codesandbox.io/s/hopeful-zhukovsky-yuxqi?file=/src/App.vue
Steps to reproduce
What is expected?
checkbox expected to be checked since model is false and true-value="false"
What is actually happening?
checkbox is not checked on first render
After you click it once, it actually works okay.
The text was updated successfully, but these errors were encountered: