Skip to content

Commit

Permalink
fix(virtualScroll): fixes from rc1 breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed May 14, 2016
1 parent 4c19d15 commit 158f717
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ionic/components/virtual-scroll/test/basic/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<ion-list [virtualScroll]="items"
[headerFn]="headerFn">

<ion-item-divider *virtualHeader="#header">
<ion-item-divider *virtualHeader="let header">
Header: {{header}}
</ion-item-divider>

<ion-item *virtualItem="#item">
<ion-item *virtualItem="let item">
Item: {{item}}
</ion-item>

Expand Down
2 changes: 1 addition & 1 deletion ionic/components/virtual-scroll/test/cards/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div [virtualScroll]="items" approxItemHeight="320px">

<ion-card *virtualItem="#item">
<ion-card *virtualItem="let item">

<div>
<ion-img [src]="item.imgSrc" [height]="item.imgHeight"></ion-img>
Expand Down
6 changes: 3 additions & 3 deletions ionic/components/virtual-scroll/test/image-gallery/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@
approxHeaderWidth="100%"
approxHeaderHeight="36px">

<div *virtualHeader="#header" class="virtual-header">
<div *virtualHeader="let header" class="virtual-header">
Header: {{header.date}}
</div>

<div *virtualItem="#item" class="virtual-item">
<div *virtualItem="let item" class="virtual-item">
<ion-img [src]="item.imgSrc"></ion-img>
<!--{{ item.index }}-->
</div>

<div *virtualFooter="#footer" class="virtual-footer">
<div *virtualFooter="let footer" class="virtual-footer">
footer
</div>

Expand Down
4 changes: 2 additions & 2 deletions ionic/components/virtual-scroll/test/variable-size/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

<ion-list [virtualScroll]="items" [headerFn]="headerFn">

<ion-item-divider *virtualHeader="#header">
<ion-item-divider *virtualHeader="let header">
Header: {{ header }}
</ion-item-divider>

<ion-item *virtualItem="#item">
<ion-item *virtualItem="let item">
<span [style.fontSize]="item.fontSize">{{ item.item }}</span>
</ion-item>

Expand Down
2 changes: 1 addition & 1 deletion ionic/components/virtual-scroll/virtual-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
for (var i = 0; i < this._nodes.length; i++) {
node = this._nodes[i];
if (node.hasChanges) {
node.view['changeDetectorRef'].detectChanges();
node.view['detectChanges']();
node.hasChanges = false;
}
}
Expand Down
2 changes: 0 additions & 2 deletions ionic/components/virtual-scroll/virtual-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ export function populateNodeData(startCellIndex: number, endCellIndex: number, v
// apply the cell's data to this node
availableNode.view.context.$implicit = cell.data || records[cell.record];
availableNode.view.context.index = cellIndex;
availableNode.view.context.even = (cellIndex % 2 === 0);
availableNode.view.context.odd = (cellIndex % 2 === 1);
availableNode.hasChanges = true;
availableNode.lastTransform = null;
madeChanges = true;
Expand Down

0 comments on commit 158f717

Please sign in to comment.