You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works well when I declare it and call later MyView.render() (so render without args. However, we noticed that this dynamic context is not reapplied when render is call with args. Typically, if your decide to do this kind of code :
When the change event is triggered (for example by a fetch), the dynamic context will not be part of the render.
We detected that this problem occurs because of _ensureContext function in resthub.js. In fact when render is called whith an arg, this _.each loop ignore the dynamic context :
In this, our custom parameters is given in a dynamic context with a "viewOptions" attributes. So as the key viewOptions exists, we can have thus a dynamic context.
Thank you for considering this issue,
Stephen
(AWL)
The text was updated successfully, but these errors were encountered:
Hi,
Info : "// RESThub Backbone stack 2.1.2"
I needed to create a dynamic context to a view. So I followed your documentation ( http://resthub.org/backbone-stack.html#default-render-with-root-and-context-attributes ), paragraph about creating a dynamic context.
This works well when I declare it and call later MyView.render() (so render without args. However, we noticed that this dynamic context is not reapplied when render is call with args. Typically, if your decide to do this kind of code :
When the change event is triggered (for example by a fetch), the dynamic context will not be part of the render.
We detected that this problem occurs because of _ensureContext function in resthub.js. In fact when render is called whith an arg, this _.each loop ignore the dynamic context :
A solution we found, rewriting this _.each like this (we assume that this is maybe not the best manner, but it works) :
In this, our custom parameters is given in a dynamic context with a "viewOptions" attributes. So as the key viewOptions exists, we can have thus a dynamic context.
Thank you for considering this issue,
Stephen
(AWL)
The text was updated successfully, but these errors were encountered: