@@ -26,7 +26,7 @@ import { IgxTabsComponent, IgxTabsModule } from '../../tabs/tabs/public_api';
26
26
import { IgxGridRowComponent } from './grid-row.component' ;
27
27
28
28
29
- describe ( 'IgxGrid Component Tests #grid' , ( ) => {
29
+ fdescribe ( 'IgxGrid Component Tests #grid' , ( ) => {
30
30
const MIN_COL_WIDTH = '136px' ;
31
31
const COLUMN_HEADER_CLASS = '.igx-grid__th' ;
32
32
@@ -2114,9 +2114,13 @@ describe('IgxGrid Component Tests #grid', () => {
2114
2114
const fix = TestBed . createComponent ( IgxGridWrappedInContComponent ) ;
2115
2115
const grid = fix . componentInstance . grid ;
2116
2116
fix . componentInstance . data = fix . componentInstance . fullData ;
2117
+ fix . detectChanges ( ) ;
2118
+ tick ( 16 ) ;
2117
2119
fix . componentInstance . paging = true ;
2118
2120
fix . detectChanges ( ) ;
2119
2121
tick ( 16 ) ;
2122
+ grid . notifyChanges ( true ) ;
2123
+ fix . detectChanges ( ) ;
2120
2124
2121
2125
// Compare the result returned by both get_row_by_index and getRowByIndex
2122
2126
expect ( grid . gridAPI . get_row_by_index ( fix . componentInstance . pageSize + 1 ) ) . toBeUndefined ( ) ;
@@ -2195,7 +2199,6 @@ describe('IgxGrid Component Tests #grid', () => {
2195
2199
} ) ;
2196
2200
2197
2201
it ( 'IgxTabs: should initialize a grid with correct height when paging and summaries are enabled' , async ( ) => {
2198
-
2199
2202
const grid = fix . componentInstance . grid4 ;
2200
2203
const tab = fix . componentInstance . tabs ;
2201
2204
tab . items . toArray ( ) [ 3 ] . selected = true ;
@@ -2327,7 +2330,7 @@ describe('IgxGrid Component Tests #grid', () => {
2327
2330
} ) ;
2328
2331
} ) ) ;
2329
2332
2330
- it ( 'should have access to grid context' , ( ) => {
2333
+ fit ( 'should have access to grid context' , ( ) => {
2331
2334
const fix = TestBed . createComponent ( IgxGridWithCustomPaginationTemplateComponent ) ;
2332
2335
fix . detectChanges ( ) ;
2333
2336
@@ -2711,8 +2714,8 @@ export class IgxGridWithCustomFooterComponent extends IgxGridTestComponent {
2711
2714
@Component ( {
2712
2715
template :
2713
2716
`<div [style.width.px]="outerWidth" [style.height.px]="outerHeight">
2714
- <igx-grid #grid [data]="data" [displayDensity]="density" [autoGenerate]="true"
2715
- [paging] ="paging" [perPage]="pageSize">
2717
+ <igx-grid #grid [data]="data" [displayDensity]="density" [autoGenerate]="true">
2718
+ <igx-paginator *ngIf ="paging" [perPage]="pageSize"></igx-paginator >
2716
2719
</igx-grid>
2717
2720
</div>`
2718
2721
} )
@@ -2985,15 +2988,15 @@ export class IgxGridFormattingComponent extends BasicGridComponent {
2985
2988
<span igxTabHeaderLabel>Tab 4</span>
2986
2989
</igx-tab-header>
2987
2990
<igx-tab-content>
2988
- <igx-grid #grid4 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'300px'"
2989
- [paging]="true" [perPage]="3">
2991
+ <igx-grid #grid4 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'300px'">
2990
2992
<igx-column
2991
2993
*ngFor="let column of columns"
2992
2994
[field]="column.field"
2993
2995
[header]="column.field"
2994
2996
[hasSummary]="true"
2995
2997
>
2996
2998
</igx-column>
2999
+ <igx-paginator [perPage]="3"></igx-paginator>
2997
3000
</igx-grid>
2998
3001
</igx-tab-content>
2999
3002
</igx-tab-item>
@@ -3002,14 +3005,14 @@ export class IgxGridFormattingComponent extends BasicGridComponent {
3002
3005
<span igxTabHeaderLabel>Tab 5</span>
3003
3006
</igx-tab-header>
3004
3007
<igx-tab-content>
3005
- <igx-grid #grid5 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'100%'"
3006
- [paging]="true" [perPage]="4">
3008
+ <igx-grid #grid5 [data]="data" [primaryKey]="'id'" [width]="'500px'" [height]="'100%'">
3007
3009
<igx-column
3008
3010
*ngFor="let column of columns"
3009
3011
[field]="column.field"
3010
3012
[header]="column.field"
3011
3013
>
3012
3014
</igx-column>
3015
+ <igx-paginator [perPage]="4"></igx-paginator>
3013
3016
</igx-grid>
3014
3017
</igx-tab-content>
3015
3018
</igx-tab-item>
@@ -3074,12 +3077,13 @@ export class IgxGridInsideIgxTabsComponent {
3074
3077
3075
3078
@Component ( {
3076
3079
template : `
3077
- <igx-grid #grid [data]="data"
3078
- [paging]="true" [paginationTemplate]="pager" [autoGenerate]="true">
3080
+ <igx-grid #grid [data]="data" [autoGenerate]="true">
3081
+ <igx-paginator>
3082
+ <igx-paginator-content *ngIf="grid.rendered">
3083
+ <h2>{{grid.totalRecords}}</h2>
3084
+ </igx-paginator-content>
3085
+ </igx-paginator>
3079
3086
</igx-grid>
3080
- <ng-template #pager let-grid>
3081
- <h2>{{grid.totalRecords}}</h2>
3082
- </ng-template>
3083
3087
`
3084
3088
} )
3085
3089
export class IgxGridWithCustomPaginationTemplateComponent {
0 commit comments