nested datasource property in repeaters
osher opened this issue · comments
osher commented
consider the following template:
<ol>
<li s:repeat="receipt.products">
<span>{{data.name}}</span>
<br>{{data.effects.length}}
<ol>
<li s:repeat="data.effects as effect">{{effect.name}}</li>
</ol>
</li>
</ol>
the data.effects.length
prints correctly the number of elements, but the nested repeater does not see the data 😢
Avichay Eyal commented
The bindings takes effect on data
property, not the effects
nested property.
If you re-set the data, does this work?
osher commented
Can you please elaborate what do you mean by "re-set the data"? I don't set it anywhere, it's all templates magic
Avichay Eyal commented
resetting the data, even if unchanged
this.data = this.data
or this.commit('data')
;
The first one invokes the setter function, which automatically invokes the commit.