Open DoomyTheFroomy opened 8 years ago
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?
@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?!
I've had many issues with bindings in Ampersand. I've actually kind of just started writing my own bindings manually.
I believe once this PR is merged it will solve this issue https://github.com/AmpersandJS/ampersand-view/pull/181
After #105 has been successfully solved it is necessary to call
this._upsertBindings()
in therender
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 therender
function to do your own stuff. A better solution would be to generally callthis._upsertBindings()
, whenrender()
is called, even if it is overridden.