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

Enhance docu about _upsertBindings() #180

Open
DoomyTheFroomy opened this issue Aug 11, 2016 · 4 comments
Open

Enhance docu about _upsertBindings() #180

DoomyTheFroomy opened this issue Aug 11, 2016 · 4 comments

Comments

@DoomyTheFroomy
Copy link

After #105 has been successfully solved it is necessary to call this._upsertBindings() in the render function. Otherwise the view won't be rendered correctly after it has been removed. This happens mostly if you use a ampersand-view-switcher to handle your workflow and you have overridden the render function to do your own stuff. A better solution would be to generally call this._upsertBindings(), when render() is called, even if it is overridden.

@cdaringe
Copy link
Member

Ah, difficult to believe this hasn't come up before. I thought we handled this case? Checkout _setRender. When you extend the view, we wrap it, call your new render, and do some other work. We could probably find a way in there to do the upsert in there and make you never have to worry about it. What do you think?

@DoomyTheFroomy
Copy link
Author

@cdaringe this sounds good and looks like the right place, the same would be for _setRemove!
I think you didn't came up before, because this case is very special, but if you like I could give you an example?!

@cmazakas
Copy link

I've had many issues with bindings in Ampersand. I've actually kind of just started writing my own bindings manually.

@wraithgar
Copy link
Contributor

I believe once this PR is merged it will solve this issue #181

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

4 participants