{kind: "List", name: "faqList", fit: true, touch: true, multiSelect: false, fixedHeight: false, toggleSelected: true, onSetupItem: "faqSetupItem", components: [ {name: "faqItem", classes: "faqItem enyo-border-box", ontap: "faqTap", components: [ {name: "faqQuestion", classes: "faqQuestion"}, {name: "faqDrawer", kind: "onyx.Drawer", orient: "v", animated: true, open: false, components: [ {name: "faqAnswer", classes: "faqAnswer", allowHtml: true} ]} ]} ]} faqTap: function(inSender, inEvent){ this.$.faqDrawer.setOpen(!this.$.faqDrawer.open); }
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Most FAQs I come across are <100 Questions so a repeater would be OK and things just work with a repeater, drawers certainly do, and you avoid all the unpleasantness of lists & flyweight pattern.
In the fiddle below, I've overridden portions of onyx.Drawer as well as imposed a few requirements on the consumer of enyo.List to get everything working. It does work but I haven't tested it exhaustively. Hopefully this gets us closer to a reasonable solution.
http://jsfiddle.net/ryanjduffy/Zn79h/3/
http://jsfiddle.net/Zn79h/5/