JSFiddle - React, Tailwind, and code Playground
by Derek Anderson
JavaScript
enyo.kind({
name: "testKind",
components:[{
kind:"enyo.DataList",
name:"repeater",
components: [
{components: [
{components: [
{name: "message"},
]}
], bindings: [
{from: ".model.message", to: ".$.message.content"},
]}
]
}],
create: enyo.inherit(function (sup) {
return function () {
this.collection = new enyo.Collection(this.data);
sup.apply(this, arguments);
var bind = new enyo.Binding({
from:".collection",
to: ".$.repeater.collection",
owner: this
});
};
}),
data: [
{ message: "Hi" },
{ message: "Hello" },
{ message: "Goodbye" },
],
});
new testKind().renderInto(document.body);