Skip to content

Commit

Permalink
Fixes liferay#1268 - Update demos
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Lancha authored and bryceosterhaus committed Nov 5, 2018
1 parent c454c1a commit b440789
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
19 changes: 10 additions & 9 deletions packages/clay-pagination-bar/demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,20 @@ <h1>ClayPaginationBar</h1>
itemsPerPage: 20
},
],
events: {
'pageClicked': (event) => {
event.preventDefault();
console.log(`Selected page: ${event.data.page}`);
},
'itemsPerPageClicked': (event) => {
event.preventDefault();
console.log(`Selected items per page: ${event.data.item.itemsPerPage}`);
},
},
selectedEntry: 1,
spritemap: spritemap,
totalEntries: 21,
}, '#container1');

clayPaginationBar.on('pageClicked', function(e) {
console.log("Selected page: " + e.data.page);
});

clayPaginationBar.on('itemsPerPageClicked', function(e) {
console.log("Items per page: " + e.data.item.itemsPerPage);
});

</script>
</body>
</html>
11 changes: 7 additions & 4 deletions packages/clay-pagination/demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,15 @@ <h2>10 pages</h2>
new metal.ClayPagination({
baseHref: '#container',
currentPage: currentPage,
events: {
'pageClicked': (event) => {
event.preventDefault();
console.log(`Selected page: ${event.data.page}`);
},
},
spritemap: spritemap,
totalPages: totalPages,
}, '#container' + totalPages)
.on('pageClicked', function(e) {
console.log("Selected page: " + e.data.page);
});
}, '#container' + totalPages);
}
}
</script>
Expand Down

0 comments on commit b440789

Please sign in to comment.