JSFiddle - React, Tailwind, and code Playground
illustrates DataRepeater selection
by Ryan Duffy
JavaScript
enyo.kind({
name: "ex.App",
components: [
{name: "list", kind: "DataRepeater", components: [
{kind: "onyx.Item", components: [
{content: "I'm an Item"},
{name: "x", content: "I'm selected"}
], bindings: [
{from: ".selected", to: ".$.x.showing"}
]}
]}
],
create: enyo.inherit(function(sup) {
return function() {
sup.apply(this, arguments);
this.$.list.set("collection", new enyo.Collection([
{content: "item"},
{content: "item"},
{content: "item"},
{content: "item"},
{content: "item"},
{content: "item"}
]));
}
})
});
new ex.App().renderInto(document.body);