Skip to content

Commit

Permalink
lazy loading through dom-if
Browse files Browse the repository at this point in the history
  • Loading branch information
benbenbenbenbenben authored Feb 28, 2017
1 parent da3f8bd commit 716a7bf
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions paper-tree-node.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@
</paper-menu-button>
</template>
</div>
<ul hidden$={{!data.open}}>
<template is="dom-repeat" items="{{data.children}}">
<li>
<paper-tree-node data="{{item}}" actions="{{actions}}"></paper-tree-node>
</li>
</template>
</ul>
<template is="dom-if" if$="{{data.open}}">
<ul>
<template is="dom-repeat" items="{{data.children}}">
<li>
<paper-tree-node data="{{item}}" actions="{{actions}}"></paper-tree-node>
</li>
</template>
</ul>
</template>
</div>
</template>

Expand Down

0 comments on commit 716a7bf

Please sign in to comment.