Skip to content
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

"if" binder #708

Open
milonas115 opened this issue Mar 6, 2017 · 1 comment
Open

"if" binder #708

milonas115 opened this issue Mar 6, 2017 · 1 comment

Comments

@milonas115
Copy link

milonas115 commented Mar 6, 2017

Is there a reason why the "if" binder recreates the model? This causes strange errors when working with rv-on-* events. Since the event passes the model, it's passing the new model instance, not the model that rivets was binded to (obviously making any changes do not get reflected to the original model). I circumvented this by just passing "this.view.models" directly.

(this.nested || (this.nested = new Rivets.View(el, this.view.models, this.view.options()))).bind();

I picked up on one strange side effect, in which the default sightglass adapter's "stubFunction" method ended up with an undefined callback (I just added a check to make sure it was an actual callback). Was wondering if this would cause any other side effects?

@blikblum
Copy link
Contributor

blikblum commented Mar 6, 2017

See #512 and propposed fix at #486 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants