Skip to content

Commit 01e5235

Browse files
authored
Merge pull request #5772 from IgniteUI/bpenkov/fix-5770
Add index to grid.page and grid.perPage derivative
2 parents 6a34aab + c8e6e4f commit 01e5235

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid-row-selection.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ describe('IgxGrid - Row Selection #grid', () => {
18751875
}));
18761876
});
18771877

1878-
describe('Custom selectors', () => {
1878+
describe('Custom row selectors', () => {
18791879
let fix;
18801880
let grid;
18811881

@@ -1929,7 +1929,7 @@ describe('IgxGrid - Row Selection #grid', () => {
19291929
fix.detectChanges();
19301930

19311931
const firstRootRow = grid.getRowByIndex(0);
1932-
expect(firstRootRow.nativeElement.querySelector('.rowNumber').textContent).toEqual('30');
1932+
expect(firstRootRow.nativeElement.querySelector('.rowNumber').textContent).toEqual('15');
19331933
});
19341934
});
19351935
});

projects/igniteui-angular/src/lib/grids/grid/grid-row.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<ng-template *ngTemplateOutlet="
1212
this.grid.rowSelectorTemplate ? this.grid.rowSelectorTemplate : rowSelectorBaseTemplate;
1313
context: { $implicit: {
14-
index: (this.grid.groupingExpressions ? this.grid.filteredSortedData.indexOf(this.rowData) : this.index) +
15-
this.grid.page * this.grid.perPage,
14+
index: this.grid.groupingExpressions.length > 0 ? this.grid.filteredSortedData.indexOf(this.rowData) :
15+
this.index + this.grid.page * this.grid.perPage,
1616
rowID: rowID, selected: selected }}">
1717
</ng-template>
1818
</div>

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.selection.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ describe('IgxHierarchicalGrid selection #hGrid', () => {
741741
});
742742
});
743743

744-
describe('Custom selectors', () => {
744+
describe('Custom row selectors', () => {
745745
let hGrid;
746746
let firstLevelChild;
747747

0 commit comments

Comments
 (0)