Enyo (WebOS 3.0) で 1 つの VirtualRepeater を使用しています。
{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;
}
}
私がやりたいことは次のとおりです。
- 何かが真の場合、行をレンダリングします
- そうでない場合は何も表示しない 問題は、何も表示されずに空の行が表示されることです。コンテンツのある行と空の行が表示されますが、行が必要ありません。false を返すことはできません。そうしないと、VirtualRepeater が行のレンダリングを停止します。