Skip to content

Commit

Permalink
feat(virtual-scroll): apply contain:strict to virtual scroll items
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Nov 20, 2016
1 parent a8002ce commit 947780e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
7 changes: 3 additions & 4 deletions src/components/virtual-scroll/test/list/app-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ import { IonicApp, IonicModule } from '../../../..';
templateUrl: 'main.html'
})
export class E2EPage {
items: Array<{title: string, date: string}>;
items: Array<{title: string}>;

constructor() {
this.emptyList();
}

fillList() {
this.items = [];
for (let i = 0; i < 59; i++) {
for (let i = 0; i < 500; i++) {
this.items.push({
title: 'Item ' + i,
date: '23:' + (59 - i)
title: 'Item ' + i
});
}
}
Expand Down
11 changes: 1 addition & 10 deletions src/components/virtual-scroll/test/list/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@
<ion-list [virtualScroll]="items">

<ion-item text-wrap *virtualItem="let item" (click)="itemTapped($event, item)">

<ion-row class="item-row">
<ion-col class="item-title" width-80>
{{item.title}}
</ion-col>
<ion-col class="item-time" width-20>
{{item.date}}
</ion-col>
</ion-row>

{{item.title}}
</ion-item>

</ion-list>
Expand Down
2 changes: 2 additions & 0 deletions src/components/virtual-scroll/virtual-scroll.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
left: 0;

transition-duration: 0ms;

contain: strict;
}

.virtual-scroll .virtual-hidden {
Expand Down

0 comments on commit 947780e

Please sign in to comment.