Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(grid): row selection templating #4998 #5558

Merged
merged 78 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
3c8c632
feat(grid): add grid row-selection templating #4998
jackofdiamond5 Jul 30, 2019
be86bb9
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
jackofdiamond5 Jul 31, 2019
653ee56
feat(tree-grid): add row-selection templating #4998
jackofdiamond5 Aug 1, 2019
e62df92
refactor(grid): replace any with strict types; update HeadSelectorSta…
jackofdiamond5 Aug 1, 2019
d485d5c
test(grid): initial test spec file #4998
Lipata Aug 1, 2019
8de532b
refactor(grid/tree-grid): expose selectedCount, totalCount in head co…
jackofdiamond5 Aug 2, 2019
c7b3211
Merge branch 'bpenkov/row-selection-templating' of https://github.com…
jackofdiamond5 Aug 2, 2019
814844c
refactor(grid-base): expose selectedRowsCount and totalRowsCount
jackofdiamond5 Aug 2, 2019
ee7b766
feat(hgrid): add row-selection templating #4998
jackofdiamond5 Aug 2, 2019
bcb3ef3
test(grid-selection): update should select all rows programatically #…
jackofdiamond5 Aug 8, 2019
83559e4
refactor(igx-selection): pass TemplateRef to directives' constructors
jackofdiamond5 Aug 8, 2019
19559c2
refactor(grid): remove unneeded public props; keep row index on grid …
jackofdiamond5 Aug 8, 2019
261f035
refactor(treeGrid): remove unneeded public props; keep row index on g…
jackofdiamond5 Aug 8, 2019
9042d55
refactor(hgrid): root grid and row islands can template selectors sep…
jackofdiamond5 Aug 8, 2019
128f3ee
refactor(grid-common): add IgxSelectorsModule to exports arr
jackofdiamond5 Aug 9, 2019
b95740e
refactor(grid/tree-grid/hgrid): use grid.data in head context
jackofdiamond5 Aug 9, 2019
5d7a2e4
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
jackofdiamond5 Aug 12, 2019
c8ca67a
refactor(grid): use indexes from filteredSortedData for row numbering
jackofdiamond5 Aug 16, 2019
35dea3c
refactor(hgrid/hgrid-row): include row selection methods in header/ro…
jackofdiamond5 Aug 16, 2019
3040e08
chore(grid): fix lint errors
jackofdiamond5 Aug 19, 2019
75ad7a7
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 19, 2019
37a7e66
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 20, 2019
1166711
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 21, 2019
55ae1ef
test(row-selection): move initial test spec to grid-row-selection.spe…
jackofdiamond5 Aug 22, 2019
b052d11
chore(grid-base;tree-grid): import DeprecateProperty; use onHeadSelec…
jackofdiamond5 Aug 22, 2019
6beb4d1
refactor(row-selection.spec): add test components to testbed declarat…
jackofdiamond5 Aug 22, 2019
3cd6003
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 22, 2019
7d40582
docs(grid-base): document rowSelectorTemplate & headSelectorTemplate …
jackofdiamond5 Aug 22, 2019
4632c0e
refactor(row.component): remove redundant rowSelected property
jackofdiamond5 Aug 22, 2019
a905a95
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 22, 2019
824b6fb
refactor(grid-base): use grid.selectedRows in context; remove selecte…
jackofdiamond5 Aug 22, 2019
1704404
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 22, 2019
48764f0
refactor(tree-grid): use records.size in context
jackofdiamond5 Aug 22, 2019
f62b46f
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 23, 2019
763c83d
refactor(grid-base): rename headerCheckboxAriaLabel to headSelectorBa…
jackofdiamond5 Aug 23, 2019
85062bc
test(custom-selectors): update initial specs #4998
jackofdiamond5 Aug 23, 2019
d6ee9a7
refactor(hgrid-row): preserve 'this' in select/deselect methods
jackofdiamond5 Aug 23, 2019
fb2c69d
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 23, 2019
ff25e66
chore(hgrid-sample-component): rename row island ref props
jackofdiamond5 Aug 23, 2019
c889e4a
Merge branch 'ddincheva/gridSelection' of https://github.com/IgniteUI…
jackofdiamond5 Aug 26, 2019
e05a349
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
jackofdiamond5 Aug 26, 2019
eb59e66
refactor(hgrid-row/tgrid-row): use selected getter in context
jackofdiamond5 Aug 26, 2019
f3cb871
Merge branch 'master' into bpenkov/row-selection-templating
wnvko Aug 26, 2019
7b84814
Merge branch 'bpenkov/row-selection-templating' of https://github.com…
jackofdiamond5 Aug 27, 2019
28e8719
test(hgrid): add test scenarios #5558
jackofdiamond5 Aug 28, 2019
38228d3
Merge branch 'nrobakova/hgrid-rowSelection-tests' of https://github.c…
jackofdiamond5 Aug 28, 2019
fd58b83
refactor(grid-base): remove unneeded property; hide rowSelectorsTemplate
jackofdiamond5 Aug 28, 2019
02f5cd7
Merge branch 'master' into bpenkov/row-selection-templating
Lipata Aug 28, 2019
e063c5a
test(grid): Adding igxGrid selection tests #4998
dafo Aug 29, 2019
1a5a00c
Merge branch 'bpenkov/row-selection-templating' of https://github.com…
dafo Aug 29, 2019
b254d1c
test(grid): Adding a selection test #4998
dafo Aug 29, 2019
ebe144a
test(grid): Removing a fit #4998
dafo Aug 29, 2019
c64e6d4
test(grid): Adding tree grid selection tests #4498
dafo Aug 29, 2019
495c9e4
test(hGrid): update test scenarios #4998
jackofdiamond5 Aug 29, 2019
90af219
refactor(hGrid): move click handler to div; add markForCheck #4998
jackofdiamond5 Aug 29, 2019
b6bfe97
Merge branch 'bpenkov/row-selection-templating' of https://github.com…
jackofdiamond5 Aug 29, 2019
0f28e91
chore(tGrid): fix lint erros in tests
jackofdiamond5 Aug 29, 2019
24d4dfa
chore(tGrid/grid): fix lint errors
jackofdiamond5 Aug 29, 2019
e190ede
refactor(tGrid-row): move click handler on div
jackofdiamond5 Aug 30, 2019
72dafa2
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
jackofdiamond5 Aug 30, 2019
d475a4a
docs(hGrid-row): document select, deselect methods;
jackofdiamond5 Aug 30, 2019
d45b8e6
docs(row-sel-templating): update changelog
jackofdiamond5 Aug 30, 2019
10ec54e
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
jackofdiamond5 Aug 30, 2019
989debe
chore(grid-samples.spec): include OnInit in imports
jackofdiamond5 Aug 30, 2019
c054b70
Merge branch 'master' into bpenkov/row-selection-templating
jackofdiamond5 Sep 2, 2019
46b5ad4
chore(*): delete package-lock,json
jackofdiamond5 Sep 2, 2019
023ccba
chore(*): revert package-lock.json
jackofdiamond5 Sep 2, 2019
da21b2d
docs(grid-base): set row and head selector template getters to hidden…
jackofdiamond5 Sep 2, 2019
14673eb
Merge branch 'master' into bpenkov/row-selection-templating
jackofdiamond5 Sep 2, 2019
a68197e
Merge branch 'bpenkov/row-selection-templating' of https://github.com…
jackofdiamond5 Sep 2, 2019
1ac0a1c
refactor(grid-base): rename rowSelectorsTemplate/headSelectorsTemplate
jackofdiamond5 Sep 2, 2019
7c87a60
refactor(grid/tGrid/hGrid): apply requested changes
jackofdiamond5 Sep 2, 2019
3dba085
chore(grid-selection): rename filteredAndSelectedData method
jackofdiamond5 Sep 3, 2019
216f5a0
refactor(grid/tGrid/hGrid): apply requested changes
jackofdiamond5 Sep 3, 2019
8c1c20d
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
jackofdiamond5 Sep 3, 2019
7af3945
Merge branch 'master' into bpenkov/row-selection-templating
Lipata Sep 3, 2019
50dd034
refactor(grid/tGrid/hGrid): apply requested changes
jackofdiamond5 Sep 3, 2019
059bf38
Merge branch 'bpenkov/row-selection-templating' of https://github.com…
jackofdiamond5 Sep 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/igniteui-angular/src/lib/grids/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ export class GridBaseAPIService <T extends IgxGridBaseComponent & IGridDataBinda
if (grid.rowSelectable && grid.selection.is_item_selected(grid.id, rowId)) {
grid.deselectRows([rowId]);
} else {
grid.checkHeaderCheckboxStatus();
grid.determineRowSelectionStatus();
}

this.deleteRowFromData(rowId, index);
Expand Down
148 changes: 97 additions & 51 deletions projects/igniteui-angular/src/lib/grids/grid-base.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ import {
} from './filtering/excel-style/grid.excel-style-filtering.component';
import { IgxGridColumnResizerComponent } from './grid-column-resizer.component';
import { IgxGridFilteringRowComponent } from './filtering/grid-filtering-row.component';
import { IgxDragIndicatorIconDirective } from './row-drag.directive';
import { IgxDragDirective } from '../directives/dragdrop/dragdrop.directive';
import { DeprecateProperty } from '../core/deprecateDecorators';
import { CharSeparatedValueData } from '../services/csv/char-separated-value-data';
import { IgxHeadSelectorDirective, IgxRowSelectorDirective } from './igx-selection.module';

const MINIMUM_COLUMN_WIDTH = 136;
const FILTER_ROW_HEIGHT = 50;
Expand Down Expand Up @@ -258,6 +258,18 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
private _observer: MutationObserver;
protected _destroyed = false;
private overlayIDs = [];
public rowSelected = false;
jackofdiamond5 marked this conversation as resolved.
Show resolved Hide resolved

/**
* @hidden
*/
public selectedRowsCount = 0;

/**
* @hidden
*/
public totalRowsCount = 0;

/**
* An accessor that sets the resource strings.
* By default it uses EN resources.
Expand Down Expand Up @@ -1716,6 +1728,28 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
@ContentChildren(IgxGridToolbarCustomContentDirective, { read: IgxGridToolbarCustomContentDirective, descendants: false })
public toolbarCustomContentTemplates: QueryList<IgxGridToolbarCustomContentDirective>;

public get headSelectorTemplate(): TemplateRef<IgxHeadSelectorDirective> {
if (this.headSelectorsTemplate && this.headSelectorsTemplate.first) {
return this.headSelectorsTemplate.first.templateRef;
}

return null;
}

@ContentChildren(IgxHeadSelectorDirective, { read: IgxHeadSelectorDirective, descendants: false })
public headSelectorsTemplate: QueryList<IgxHeadSelectorDirective>;
jackofdiamond5 marked this conversation as resolved.
Show resolved Hide resolved

public get rowSelectorTemplate(): TemplateRef<IgxRowSelectorDirective> {
if (this.rowSelectorsTemplate && this.rowSelectorsTemplate.first) {
return this.rowSelectorsTemplate.first.templateRef;
}

return null;
}

@ContentChildren(IgxRowSelectorDirective, { read: IgxRowSelectorDirective, descendants: false })
jackofdiamond5 marked this conversation as resolved.
Show resolved Hide resolved
public rowSelectorsTemplate: QueryList<IgxRowSelectorDirective>;
jackofdiamond5 marked this conversation as resolved.
Show resolved Hide resolved

/**
* @hidden
*/
Expand Down Expand Up @@ -1749,8 +1783,8 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
/**
* @hidden
*/
@ViewChild('headerCheckboxContainer', { static: false })
public headerCheckboxContainer: ElementRef;
@ViewChild('headerSelectorContainer', { static: false })
public headerSelectorContainer: ElementRef;

/**
* @hidden
Expand All @@ -1767,8 +1801,8 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
/**
* @hidden
*/
@ViewChild('headerCheckbox', { read: IgxCheckboxComponent, static: false })
public headerCheckbox: IgxCheckboxComponent;
@ViewChild(IgxCheckboxComponent, { read: IgxCheckboxComponent, static: false })
jackofdiamond5 marked this conversation as resolved.
Show resolved Hide resolved
public headSelectorBaseTemplate: IgxCheckboxComponent;

/**
* @hidden
Expand Down Expand Up @@ -1847,6 +1881,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
*/
@ViewChild('defaultRowEditTemplate', { read: TemplateRef, static: true })
private defaultRowEditTemplate: TemplateRef<any>;

/**
* @hidden
*/
Expand Down Expand Up @@ -3317,7 +3352,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
return totalWidth;
}

get showRowCheckboxes(): boolean {
get showRowSelectors(): boolean {
jackofdiamond5 marked this conversation as resolved.
Show resolved Hide resolved
return this.rowSelectable && this.hasVisibleColumns;
}

Expand Down Expand Up @@ -4130,14 +4165,14 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
return null;
}
const footerHeight = this.summariesHeight || this.tfoot.nativeElement.offsetHeight -
this.tfoot.nativeElement.clientHeight;
this.tfoot.nativeElement.clientHeight;
let gridHeight;
const computed = this.document.defaultView.getComputedStyle(this.nativeElement);
const toolbarHeight = this.getToolbarHeight();
const pagingHeight = this.getPagingHeight();
const groupAreaHeight = this.getGroupAreaHeight();
const renderedHeight = toolbarHeight + this.theadRow.nativeElement.offsetHeight +
footerHeight + pagingHeight + groupAreaHeight +
footerHeight + pagingHeight + groupAreaHeight +
this.scr.nativeElement.clientHeight;

if (this.isPercentHeight) {
Expand Down Expand Up @@ -4194,8 +4229,8 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
parseInt(this.document.defaultView.getComputedStyle(this.nativeElement).getPropertyValue('width'), 10);
}

if (this.showRowCheckboxes) {
computedWidth -= this.headerCheckboxContainer ? this.headerCheckboxContainer.nativeElement.offsetWidth : 0;
if (this.showRowSelectors) {
computedWidth -= this.headerSelectorContainer ? this.headerSelectorContainer.nativeElement.offsetWidth : 0;
}

const visibleChildColumns = this.visibleColumns.filter(c => !c.columnGroup);
Expand Down Expand Up @@ -4372,8 +4407,8 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
public getFeatureColumnsWidth() {
let width = 0;

if (this.headerCheckboxContainer) {
width += this.headerCheckboxContainer.nativeElement.getBoundingClientRect().width;
if (this.headerSelectorContainer) {
width += this.headerSelectorContainer.nativeElement.getBoundingClientRect().width;
}
if (this.headerDragContainer) {
width += this.headerDragContainer.nativeElement.getBoundingClientRect().width;
Expand Down Expand Up @@ -4575,48 +4610,59 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
/**
* @hidden
*/
public onHeaderCheckboxClick(event, filteredData) {
this.allRowsSelected = event.checked;
const newSelection =
event.checked ?
filteredData ?
this.selection.add_items(this.id, this.selection.get_all_ids(filteredData, this.primaryKey)) :
this.selection.get_all_ids(this.gridAPI.get_all_data(true), this.primaryKey) :
filteredData ?
this.selection.delete_items(this.id, this.selection.get_all_ids(filteredData, this.primaryKey)) :
this.selection.get_empty();
this.triggerRowSelectionChange(newSelection, null, event, event.checked);
this.checkHeaderCheckboxStatus(event.checked);
public onHeadSelectorClick(event, filteredData) {
this.rowSelected = !this.rowSelected;
this.allRowsSelected = this.rowSelected;
let newSelection;
if (this.rowSelected) {
newSelection = filteredData ?
this.selection.add_items(this.id, this.selection.get_all_ids(filteredData, this.primaryKey)) :
this.selection.get_all_ids(this.gridAPI.get_all_data(true), this.primaryKey);
} else {
newSelection = filteredData ?
this.selection.delete_items(this.id, this.selection.get_all_ids(filteredData, this.primaryKey)) :
this.selection.get_empty();
}

this.triggerRowSelectionChange(newSelection, null, event, this.rowSelected);
this.determineRowSelectionStatus(this.rowSelected);
}

/**
* @hidden
*/
get headerCheckboxAriaLabel() {
return this._filteringExpressionsTree.filteringOperands.length > 0 ?
this.headerCheckbox && this.headerCheckbox.checked ? 'Deselect all filtered' : 'Select all filtered' :
this.headerCheckbox && this.headerCheckbox.checked ? 'Deselect all' : 'Select all';
this.headSelectorBaseTemplate && this.headSelectorBaseTemplate.checked ? 'Deselect all filtered' : 'Select all filtered' :
this.headSelectorBaseTemplate && this.headSelectorBaseTemplate.checked ? 'Deselect all' : 'Select all';
}

/**
* @hidden
*/
public checkHeaderCheckboxStatus(headerStatus?: boolean) {
public determineRowSelectionStatus(
headerStatus?: boolean): void {
if (headerStatus === undefined) {
const filteredData = this.filteringService.filteredData;
const dataLength = filteredData ? filteredData.length : this.dataLength;
this.allRowsSelected = this.selection.are_all_selected(this.id, dataLength);
if (this.headerCheckbox) {
this.headerCheckbox.indeterminate = !this.allRowsSelected && !this.selection.are_none_selected(this.id);
if (!this.headerCheckbox.indeterminate) {
this.headerCheckbox.checked =
const areNoneSelected = this.selection.are_none_selected(this.id);
if (this.headSelectorBaseTemplate) {
this.headSelectorBaseTemplate.indeterminate = !this.allRowsSelected && !areNoneSelected;
if (!this.headSelectorBaseTemplate.indeterminate) {
this.headSelectorBaseTemplate.checked =
this.allRowsSelected;
}
}
this.cdr.markForCheck();
} else if (this.headerCheckbox) {
this.headerCheckbox.checked = headerStatus !== undefined ? headerStatus : false;
} else {
if (this.headSelectorBaseTemplate) {
this.headSelectorBaseTemplate.checked = headerStatus;
}
}

this.selectedRowsCount = this.selectedRows().length;
this.totalRowsCount = this.gridAPI.get_all_data().length;
this.cdr.markForCheck();
}

/**
Expand Down Expand Up @@ -4649,32 +4695,32 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
* @hidden
*/
public updateHeaderCheckboxStatusOnFilter(data) {
if (!data || !this.hasVisibleColumns || !this.headerCheckbox) {
this.checkHeaderCheckboxStatus();
if (!data || !this.hasVisibleColumns || !this.headSelectorBaseTemplate) {
this.determineRowSelectionStatus();
return;
}
switch (this.filteredItemsStatus(this.id, data, this.primaryKey)) {
case 'allSelected': {
if (!this.allRowsSelected) {
this.allRowsSelected = true;
}
if (this.headerCheckbox.indeterminate) {
this.headerCheckbox.indeterminate = false;
if (this.headSelectorBaseTemplate.indeterminate) {
this.headSelectorBaseTemplate.indeterminate = false;
}
break;
}
case 'noneSelected': {
if (this.allRowsSelected) {
this.allRowsSelected = false;
}
if (this.headerCheckbox.indeterminate) {
this.headerCheckbox.indeterminate = false;
if (this.headSelectorBaseTemplate.indeterminate) {
this.headSelectorBaseTemplate.indeterminate = false;
}
break;
}
default: {
if (!this.headerCheckbox.indeterminate) {
this.headerCheckbox.indeterminate = true;
if (!this.headSelectorBaseTemplate.indeterminate) {
this.headSelectorBaseTemplate.indeterminate = true;
}
if (this.allRowsSelected) {
this.allRowsSelected = false;
Expand Down Expand Up @@ -4862,7 +4908,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
if (col) {
const key = headers ? col.header || col.field : col.field;
record[key] = formatters && col.formatter ? col.formatter(source[row][col.field])
: source[row][col.field];
: source[row][col.field];
}
});
}
Expand All @@ -4877,15 +4923,15 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
protected getSelectableColumnsAt(index) {
if (this.hasColumnLayouts) {
const visibleLayoutColumns = this.visibleColumns
.filter(col => col.columnLayout)
.sort((a, b) => a.visibleIndex - b.visibleIndex);
.filter(col => col.columnLayout)
.sort((a, b) => a.visibleIndex - b.visibleIndex);
const colLayout = visibleLayoutColumns[index];
return colLayout ? colLayout.children.toArray() : [];
} else {
const visibleColumns = this.visibleColumns
.filter(col => !col.columnGroup)
.sort((a, b) => a.visibleIndex - b.visibleIndex);
return [ visibleColumns[index] ];
.filter(col => !col.columnGroup)
.sort((a, b) => a.visibleIndex - b.visibleIndex);
return [visibleColumns[index]];
}
}

Expand Down Expand Up @@ -4915,7 +4961,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
newSelectionAsSet.add(args.newSelection[i]);
}
this.selection.set(this.id, newSelectionAsSet);
this.checkHeaderCheckboxStatus(headerStatus);
this.determineRowSelectionStatus(headerStatus);
}

/**
Expand Down Expand Up @@ -4948,7 +4994,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
this.onGridCopy.emit(ev);

if (ev.cancel) {
return;
return;
}

const transformer = new CharSeparatedValueData(ev.data, this.clipboardOptions.separator);
Expand Down Expand Up @@ -5642,7 +5688,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
const index = args.context.index;
args.view.detectChanges();
const row = tmplId === 'dataRow' ? this.getRowByIndex(index) : null;
const summaryRow = tmplId === 'summaryRow' ? this.summariesRowList.toArray().find((sr) => sr.dataRowIndex === index) : null;
const summaryRow = tmplId === 'summaryRow' ? this.summariesRowList.toArray().find((sr) => sr.index === index) : null;
if (row && row instanceof IgxRowComponent) {
this._restoreVirtState(row);
} else if (summaryRow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import { IgxGridExcelStyleFilteringModule } from './filtering/excel-style/grid.e
import { IgxGridDragSelectDirective } from './drag-select.directive';
import { IgxGridColumnResizerComponent } from './grid-column-resizer.component';
import { IgxRowDragModule } from './row-drag.directive';
import { IgxSelectorsModule } from './igx-selection.module';
/**
* @hidden
*/
Expand Down Expand Up @@ -193,7 +194,8 @@ import { IgxRowDragModule } from './row-drag.directive';
IgxGridPipesModule,
IgxGridExcelStyleFilteringModule,
IgxRowDragModule,
IgxPaginatorModule
IgxPaginatorModule,
IgxSelectorsModule
jackofdiamond5 marked this conversation as resolved.
Show resolved Hide resolved
],
providers: [
IgxGridSelectionService,
Expand Down
Loading