Closed evilchia closed 2 years ago
I understand m() normally is NOT proxied to the parent of the "c:each" - we have v() to deal with a value representation but in this particular scenario it makes sense either treat the "empty" template type the same as the "item" type and make v() available OR proxy through an m() representation. This would apply to IMPLICIT templates only in a c:each scenario as an "empty" type. May have applicability with 'first' and 'after' hosting an implicit component. See current version of cydran-es6/es6/index9.html in the repo - lines 134 & 151
Apparently, I missed the non-implicit component case.
This may have been resolved by the FSM refactor, but an explicit integration test case using the test harness paradigm is needed in order to confirm.
I've started work on integration tests for this.
This issue has been resolved.
General Setup
const x_template = "
";
class ComponentX extends Component { constructor(x_template) { this.someList = []; this.attributeXYZ = "Hello"; } }
const emptyTemplate = "
builder .withPrototype("xcomponent", ComponentX) .withImplicit("myEmpty", emptyTemplate)
Expected Result See "Hello" as value when the c:each (m().someList) is empty or null