-
Notifications
You must be signed in to change notification settings - Fork 782
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
Vue.js - checkbox with same value on different pages be checked #244
Comments
@xibman , hello! Thanks for your report. May be it is because of this problem: We couldn't understand how to use multiple checkboxes with computed property. So we are using we will think how to fix it. |
I think it could be interesting to ask the question on vue gitter channel: https://gitter.im/vuejs/vue |
@xibman, done, thank you! |
@dmitrykurmanov you can use this: https://vuejs.org/v2/guide/computed.html#Computed-Setter et get the element id to store te correct value |
@dmitrykurmanov Hi, i think you could use a custom method for the checkbox: https://vuejs.org/v2/guide/components.html#Form-Input-Components-using-Custom-Events, The problem comes from shared model between all checkbox. |
Hi all, I think with the last version of vue you can solve the problem easily: Component v-model Customization Previously, v-model on a custom component defaults to use value as the prop and input as the event. This places some restrictions when authoring custom input components that resembles checkboxes or radio inputs. In 2.2 you can customize the props/event pair using the new model component option:
The above will be equivalent to:
|
@xibman we fixed it in 0.12.3 version, thanks for your help! |
Hi
I found a small bug on checkbox:
if you have multiple page with different question with checkbox with the same value, answer checked on page 1 are checked on page 2.
See the exemple: https://jsfiddle.net/z11fe07p/778/
The text was updated successfully, but these errors were encountered: