rivets: rv-if does not update children when model changes

Any binding deeper than one level within an rv-if statement is not updated when the object representing the deep binding is replaced, ala:

<div rv-if="foo">
    { foo.bar }
</div>
var model = {
    foo: {
        bar: 'original'
    }
}

model.foo = {
    bar: 'updated' // not refreshed in view
}

http://jsfiddle.net/v001txq3/

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

@arantius You can try tinybind, a fork of rivets with many bug fixes, like this one, and other improvements

https://github.com/blikblum/tinybind

Oops I forgot to fork that fiddle.

I have made a new one which shows the exact problem I’m having: rv-src is never rebound if there is an rv-if on the same element

http://jsfiddle.net/bLwdbr2o/