Skip to content

Commit 6c26529

Browse files
authored
Merge branch 'master' into rkaraivanov/grid-clipboard-master
2 parents 7838272 + c237e93 commit 6c26529

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
12181218

12191219
private _getItemSize(item, dimension: string): number {
12201220
const dim = item[dimension];
1221-
return typeof dim === 'number' ? dim : this.igxForItemSize;
1221+
return typeof dim === 'number' ? dim : parseInt(this.igxForItemSize, 10) || 0;
12221222
}
12231223
}
12241224

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.overflowContainer > .igx-display-container {
2+
overflow: visible !important;
3+
}
4+
.overflowContainer {
5+
position: relative;
6+
overflow: hidden;
7+
}

src/app/virtual-for-directive/virtual-for.sample.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@
2525
<table>
2626
<tbody style='display:grid;'>
2727
<tr style='width:500px; height:100px;'>
28-
<div style='position: relative; overflow: hidden'>
28+
<div class='overflowContainer'>
2929
<ng-template igxFor let-item [igxForOf]="data" #virtDirHorizontal
3030
[igxForScrollOrientation]="'horizontal'"
3131
[igxForContainerSize]='"500px"'
32+
[igxForItemSize]='"200px"'
3233
let-rowIndex="index">
33-
<td [style.width.px]='item.width' [style.min-width.px]='item.width' style='height:100px;'>{{rowIndex}} : {{item.text}}</td>
34+
<td [style.width.px]='200' [style.min-width.px]='200' style='height:100px;'>{{rowIndex}} : {{item.text}}</td>
3435
</ng-template>
3536
</div>
3637
</tr>
3738
</tbody>
3839
</table>
40+
<br/>
3941
<button (click)="scrNextCol()">Scroll Next Column</button>
4042
<button (click)="scrPrevCol()">Scroll Prev Column</button>
4143
<button (click)="scrNextHorizontalPage()">Scroll Next Horizontal Page</button>

src/app/virtual-for-directive/virtual-for.sample.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
import { Component, ViewChild, OnInit, AfterViewInit } from '@angular/core';
1+
import { Component, ElementRef, ViewChild, Injectable, OnInit, AfterViewInit, ViewEncapsulation } from '@angular/core';
2+
import { BehaviorSubject, Observable } from 'rxjs';
3+
import { map } from 'rxjs/operators';
4+
import { Http } from '@angular/http';
25
import { IgxForOfDirective } from 'igniteui-angular';
36
import { RemoteService } from '../shared/remote.service';
47

58

69
@Component({
710
selector: 'app-virt-for-sample',
8-
templateUrl: 'virtual-for.sample.html'
11+
templateUrl: 'virtual-for.sample.html',
12+
styleUrls: ['virtual-for.sample.css'],
13+
encapsulation: ViewEncapsulation.None
914
})
1015
export class VirtualForSampleComponent implements OnInit, AfterViewInit {
1116
search1: string;
@@ -50,7 +55,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
5055
link: '#',
5156
phone: '770-504-2217',
5257
text: 'Terrance Orta',
53-
width: 100,
5458
height: 100
5559
}, {
5660
key: 2,
@@ -59,7 +63,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
5963
link: '#',
6064
phone: '423-676-2869',
6165
text: 'Richard Mahoney',
62-
width: 200,
6366
height: 200
6467
}, {
6568
key: 3,
@@ -68,7 +71,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
6871
link: '#',
6972
phone: '859-496-2817',
7073
text: 'Donna Price',
71-
width: 300,
7274
height: 300
7375
}, {
7476
key: 4,
@@ -77,7 +79,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
7779
link: '#',
7880
phone: '901-747-3428',
7981
text: 'Lisa Landers',
80-
width: 200,
8182
height: 200
8283
}, {
8384
key: 5,
@@ -86,7 +87,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
8687
link: '#',
8788
phone: '573-394-9254',
8889
text: 'Dorothy H. Spencer',
89-
width: 200,
9090
height: 200
9191
}, {
9292
key: 6,
@@ -95,7 +95,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
9595
link: '#',
9696
phone: '323-668-1482',
9797
text: 'Stephanie May',
98-
width: 100,
9998
height: 100
10099
}, {
101100
key: 7,
@@ -104,7 +103,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
104103
link: '#',
105104
phone: '401-661-3742',
106105
text: 'Marianne Taylor',
107-
width: 100,
108106
height: 100
109107
}, {
110108
key: 8,
@@ -113,7 +111,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
113111
link: '#',
114112
phone: '662-374-2920',
115113
text: 'Tammie Alvarez',
116-
width: 300,
117114
height: 300
118115
}, {
119116
key: 9,
@@ -122,7 +119,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
122119
link: '#',
123120
phone: '240-455-2267',
124121
text: 'Charlotte Flores',
125-
width: 200,
126122
height: 200
127123
}, {
128124
key: 10,
@@ -131,7 +127,6 @@ export class VirtualForSampleComponent implements OnInit, AfterViewInit {
131127
link: '#',
132128
phone: '724-742-0979',
133129
text: 'Ward Riley',
134-
width: 100,
135130
height: 100
136131
}];
137132
for (let i = 10; i < 1e5; i++) {

0 commit comments

Comments
 (0)