-
Notifications
You must be signed in to change notification settings - Fork 309
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
rv-each updates only newly added rows in a list #480
Comments
Here is your fiddle with the minimun number of changes it took to get it working like you said: I changed your bind call to bind an object with a property called state: rivets.bind($table, {state : state}); Then I access the properties <tr rv-each-row="state.rows" style="border: 1px solid black">
<td rv-text="state.howmany"></td> |
BTW. I am not 100% sure why this happens, but I believe it is related to - #452 especially the findings of @tayfunyugruk It seems like, when you incremented the By putting the property on a object, then modifying that object the reference is maintained. Hope this helps. |
It works like a charm! Thank you for help. |
Check out this fiddle: https://jsfiddle.net/fsjvg0w5
After clicking "Add" button new row is added but "howmany" value is updated only for this new row, for every other it stays old. Is it an expected behaviour of RivetJS or is it a bug? If it is an expected behaviour then why it cannot work in a way when every row is updated when a model changes?
The text was updated successfully, but these errors were encountered: