I'm using one VirtualRepeater in Enyo (WebOS 3.0):
{kind: enyo.VirtualRepeater, name: "eventList", onSetupRow: "setupRowWithEvent", onclick: "doListTap", components: [
{kind: enyo.Item, name:"eventItem", layoutKind: enyo.HFlexLayout, tapHighlight: true, components: [
/* components of every row: inside a Enyo.Item */
]}
]}
/* more code */
setupRowWithEvent: function(inSender, inIndex) {
if (somethingIsTrue) {
return true;
}
}
What I want to do is:
The solution I've found is simple:
{kind: enyo.VirtualRepeater, name: "eventList", onSetupRow: "setupRowWithEvent", onclick: "doListTap", components: [
{kind: enyo.Item, name:"eventItem", layoutKind: enyo.HFlexLayout, tapHighlight: true, components: [
/* components of every row: inside a Enyo.Item */
]}
]}
/* more code */
setupRowWithEvent: function(inSender, inIndex) {
if (somethingIsTrue) {
// code to update every row
} else { // we don't want this row to show
this.$.eventItem.setShowing(false);
}
return true; // if you don't return true, the virtual Repeater stops fetching rows
}