Skip to content

Commit a5a7241

Browse files
committed
chore(*): addres pending issues and review comment
1 parent 32d7770 commit a5a7241

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All notable changes for each version of this project will be documented in this
88
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
99
- `uniqueColumnValuesStrategy` input is added. This property provides a callback for loading unique column values on demand. If this property is provided, the unique values it generates will be used by the Excel Style Filtering (instead of using the unique values from the data that is bound to the grid).
1010
- `igxExcelStyleLoading` directive is added, which can be used to provide a custom loading template for the Excel Style Filtering. If this property is not provided, a default loading template will be used instead.
11-
- introduced new propoerties `cellSelection` and `rowSelection` which accepts GridSelection mode enumeration. Grid selection mode could be none, single or multiple. Also `hideRowSelectors` property is added, which allows you to show and hide row selectors when row selection is enabled.
11+
- introduced new propoerties `cellSelection` and `rowSelection` which accept GridSelection mode enumeration. Grid selection mode could be none, single or multiple. Also `hideRowSelectors` property is added, which allows you to show and hide row selectors when row selection is enabled.
1212
### General
1313
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
1414
- Removed deprecated event `OnFocusChange`

projects/igniteui-angular/src/lib/core/grid-selection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,8 @@ export class IgxGridSelectionService {
646646

647647
public getRowDataByID(rowID) {
648648
if (!this.grid.primaryKey) { return rowID; }
649-
const rowIndex = this.getRowIDs(this.grid.gridAPI.get_all_data()).indexOf(rowID);
650-
return rowIndex < 0 ? {} : this.grid.gridAPI.get_all_data()[rowIndex];
649+
const rowIndex = this.getRowIDs(this.grid.gridAPI.get_all_data(true)).indexOf(rowID);
650+
return rowIndex < 0 ? {} : this.grid.gridAPI.get_all_data(true)[rowIndex];
651651
}
652652

653653
public getRowIDs(data) {
@@ -660,7 +660,7 @@ export class IgxGridSelectionService {
660660

661661
public get allData() {
662662
const allData = this.isFilteringApplied() || this.grid.sortingExpressions.length ?
663-
this.grid.filteredSortedData : this.grid.gridAPI.get_all_data();
663+
this.grid.filteredSortedData : this.grid.gridAPI.get_all_data(true);
664664
return allData.filter(rData => !this.isRowDeleted(this.grid.gridAPI.get_row_id(rData)));
665665
}
666666

projects/igniteui-angular/src/lib/grids/api.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ export class GridBaseAPIService <T extends IgxGridBaseComponent & IGridDataBinda
505505

506506
this.deleteRowFromData(rowId, index);
507507

508-
if (grid.selectionService.isRowSelected(rowId)) { grid.selectionService.deselectRow(rowId); }
508+
grid.selectionService.isRowSelected(rowId) ? grid.selectionService.deselectRow(rowId) : grid.selectionService.clearHeaderCBState();
509509
(grid as any)._pipeTrigger++;
510510
grid.notifyChanges();
511511
// Data needs to be recalculated if transactions are in place

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,6 @@ describe('IgxGrid - Row Selection #grid', () => {
14051405
}));
14061406

14071407
it('CRUD: Should handle the deselection on a selected row properly', (async () => {
1408-
pending('need to be fixed');
14091408
let firstRow = grid.getRowByKey(1);
14101409
grid.selectRows([1]);
14111410

@@ -1823,7 +1822,6 @@ describe('IgxGrid - Row Selection #grid', () => {
18231822
});
18241823

18251824
it('Should have correct header checkbox when add row', (async () => {
1826-
pending('need to be fixed');
18271825
grid.height = '800px';
18281826
fix.detectChanges();
18291827
await wait(DEBOUNCETIME);
@@ -1853,7 +1851,6 @@ describe('IgxGrid - Row Selection #grid', () => {
18531851
}));
18541852

18551853
it('Should be able to select added row', (async () => {
1856-
pending('need to be fixed');
18571854
grid.height = '800px';
18581855
fix.detectChanges();
18591856
await wait(DEBOUNCETIME);

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-expanding.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,6 @@ describe('IgxTreeGrid - Expanding / Collapsing #tGrid', () => {
991991
});
992992

993993
it('check row selection when expand a row', async () => {
994-
pending('need to be fixed');
995994
treeGrid.rowSelection = GridSelectionMode.multiple;
996995
fix.detectChanges();
997996

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ export class IgxTreeGridComponent extends IgxGridBaseComponent implements IGridD
508508

509509
parentData[this.childDataKey] = children;
510510
}
511-
511+
this.selectionService.clearHeaderCBState();
512512
this._pipeTrigger++;
513513
}
514514

0 commit comments

Comments
 (0)