Skip to content

Commit

Permalink
Removed selection code in polymer integration.
Browse files Browse the repository at this point in the history
It does not contribute to what we want to show in this demo
and can confuse the reader
  • Loading branch information
manolo committed Jun 2, 2016
1 parent 6321f2e commit 48efd83
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions demo/datasources.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,28 +440,13 @@ <h3 id="headers">Polymer Integration (Light DOM data source)</h3>
</tbody>
</table>
</vaadin-grid>
<template is="dom-if" if="{{selected}}">
<div class="user-image">
<img src="{{selected.user.picture.large}}"></img>
</div>
</template>
</template>
</div>
<code demo-var="template">
var template = template || document.querySelector('template.my-grid-with-template');
template.addEventListener('dom-change', function() {
// code
var grid = document.querySelector('#my-grid-with-template');
template.onSelect = function() {
if (grid.selection.selected().length === 0) {
template.selected = null;
} else {
template.selected = template.users[grid.selection.selected()];
}
};
getJSON('https://randomuser.me/api?results=25', function(data) {
template.users = data.results;
});
Expand Down

0 comments on commit 48efd83

Please sign in to comment.