Skip to content

Commit

Permalink
refactor(grid-row): add index to grid.page and grid.perPage derivative
Browse files Browse the repository at this point in the history
…#5770

- chore(grid/hGrid): update describes
  • Loading branch information
jackofdiamond5 committed Sep 11, 2019
1 parent 7c4c030 commit 2fe2f78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ describe('IgxGrid - Row Selection #grid', () => {
}));
});

describe('Custom selectors', () => {
describe('Custom row selectors', () => {
let fix;
let grid;

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

const firstRootRow = grid.getRowByIndex(0);
expect(firstRootRow.nativeElement.querySelector('.rowNumber').textContent).toEqual('30');
expect(firstRootRow.nativeElement.querySelector('.rowNumber').textContent).toEqual('15');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ng-template *ngTemplateOutlet="
this.grid.rowSelectorTemplate ? this.grid.rowSelectorTemplate : rowSelectorBaseTemplate;
context: { $implicit: {
index: (this.grid.groupingExpressions ? this.grid.filteredSortedData.indexOf(this.rowData) : this.index) +
this.grid.page * this.grid.perPage,
index: this.grid.groupingExpressions.length > 0 ? this.grid.filteredSortedData.indexOf(this.rowData) :
this.index + this.grid.page * this.grid.perPage,
rowID: rowID, selected: selected }}">
</ng-template>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ describe('IgxHierarchicalGrid selection #hGrid', () => {
});
});

describe('Custom selectors', () => {
describe('Custom row selectors', () => {
let hGrid;
let firstLevelChild;

Expand Down

0 comments on commit 2fe2f78

Please sign in to comment.