Skip to content

Instantly share code, notes, and snippets.

@webOS101
Created September 15, 2014 20:19
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/4ef31f02ed94b01b76d4 to your computer and use it in GitHub Desktop.
Save webOS101/4ef31f02ed94b01b76d4 to your computer and use it in GitHub Desktop.
List Sample
enyo.ready(function() {
enyo.kind({
name: 'ListSample',
kind: 'List',
count: 10000,
handlers: {
onSetupItem: 'setupItem',
ontap: 'tapped'
},
components: [{ name: 'text' }],
setupItem: function(sender, event) {
this.set('$.text.content', 'This is row ' + event.index);
return(true);
},
tapped: function(sender, event) {
enyo.log(event.index);
}
});
new enyo.Application({ name: 'app', view: 'ListSample' });
});
name: List Sample
description: Using the List layout component
authors:
- Roy Sutton
normalize_css: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment