Skip to content

Instantly share code, notes, and snippets.

@webOS101
Created September 12, 2014 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webOS101/61994e43b3556b2d0dae to your computer and use it in GitHub Desktop.
Save webOS101/61994e43b3556b2d0dae to your computer and use it in GitHub Desktop.
Repeater Sample
enyo.ready(function() {
enyo.kind({
name: 'RepeaterSample',
kind: 'Scroller',
components: [{
kind: 'Repeater',
count: 100,
components: [{ name: 'text' }],
onSetupItem: 'setupItem',
ontap: 'tapped'
}],
setupItem: function(sender, event) {
var item = event.item;
item.set('$.text.content', 'This is row ' + event.index);
return(true);
},
tapped: function(sender, event) {
enyo.log(event.index);
}
});
new enyo.Application({name: 'app', view: 'RepeaterSample'});
});
name: Repeater Sample
description: Using a repeater
authors:
- Roy Sutton
normalize_css: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment