-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Checked state bugged in 2.1.7+ when using checkbox :checked="true/false" state with Vuex #4704
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
Comments
If you select multiple boxes and you keep going back, all the other ones seem to properly update. Are you sure it's not a bug in your code? |
That's what I described in my issue, it seems to skip the last checked checkbox. I ran several tests and my code didn't change since 2.1.6. When running on 2.1.6 it works perfect. Seems that the changes in 2.1.7 (reffered the issue) are causing the problem. |
Gotcha, fair enough, I'll leave this to the experts then ;) |
I runned my code on the dev branch too and the issue remained. Especially because the state doesn't get's updated by the click or change event. |
@FKobus did you build the dev branch code? |
@yyx990803 Missed that part. When running it on the new fixes it's behaving as before. Thanks for the response |
hi, is this closed in the latest code?
program is running after updating record condition, it will read and display all datas again. thx, |
Seems fixing the bug from #4521 created a new bug for :checked="" binding when using in combination with vuex states for maintaining checkbox states.
In this code example is :checked set to true or false whenever it's in the active filter array.
It seems when this component is updated (via vuex) the :checked stated doesn't get's updated like in 2.1.6. In my application is the state managed almost totally by Vuex.
Vue.js version
2.1.7+
Reproduction Link
http://vroom.automotivated.nl/
Howto reproduce
When selecting several checkboxes (like brands) and use your browser back button to fallback to previous states. (it's managed by the popstate event and uses vuex actions to update actively the new state)
What is expected
The checkbox should go on or off depending on the previous action or new current state.
What is actually happening?
Everything get's correctly updated (value wise), except the checkbox isn't honored to update (checked true/false). It keeps in a previous state. When selecting multiple after eachother and navigating back and forward is looks like is off a beat and missing the last changed checkbox.
Code that goes with it:
https://github.com/Automotivated/vroom/blob/master/src/views/elements/filters/Multiple.vue
Full github repo:
https://github.com/Automotivated/vroom/
While reading the docs in Vuex, it seems to be best practise to do it like I did.
When did it work
It worked like a charm in 2.1.6. Seems really that fixing this bug triggered this bug to be created.
The text was updated successfully, but these errors were encountered: