BossView icon indicating copy to clipboard operation
BossView copied to clipboard

_getSubViewRenderConditions does not use _.result to resolve the property

Open billjamesdev opened this issue 10 years ago • 0 comments

It would be good if _getSubViewRenderConditions would use _.result to resolve the "subViewRenderConditions" property. In the code for our BossView, we want to specify other methods in the View as the render condition methods, but can't, since you can't reference other methods in the same object when creating an object in code.

subViewRenderConditions: {
     view1: this.testCondition1,
     view2: this.testCondition2
}

The above case does NOT work, as testCondition1 and testCondition2 are methods on the currently-being-defined view. You would need to do something like this:

subViewRenderConditions: function() {
     return {
          view1: this.testCondition1,
          view2: this.testCondition2
     }
}

This WOULD work, if _getSubViewRenderConditions used _.result.

billjamesdev avatar Jul 15 '14 18:07 billjamesdev