Skip to content

Commit e9eb7fc

Browse files
Martin DragnevMartin Dragnev
authored andcommitted
refactor(*): Expose virtualizationState accessor
1 parent e620c05 commit e9eb7fc

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,6 +2919,24 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
29192919
return false;
29202920
}
29212921

2922+
/**
2923+
* Returns the state of the grid virtualization, including the start index and how many records are rendered.
2924+
* ```typescript
2925+
* const gridVirtState = this.grid1.virtualizationState;
2926+
* ```
2927+
* @memberof IgxGridBaseDirective
2928+
*/
2929+
get virtualizationState() {
2930+
return this.verticalScrollContainer.state;
2931+
}
2932+
2933+
/**
2934+
* @hidden
2935+
*/
2936+
set virtualizationState(state) {
2937+
this.verticalScrollContainer.state = state;
2938+
}
2939+
29222940
/**
29232941
* @hidden
29242942
* @internal

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -173,24 +173,6 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
173173
this._filteredData = value;
174174
}
175175

176-
/**
177-
* Returns the state of the grid virtualization, including the start index and how many records are rendered.
178-
* ```typescript
179-
* const gridVirtState = this.grid1.virtualizationState;
180-
* ```
181-
* @memberof IgxGridComponent
182-
*/
183-
get virtualizationState() {
184-
return this.verticalScrollContainer.state;
185-
}
186-
187-
/**
188-
* @hidden
189-
*/
190-
set virtualizationState(state) {
191-
this.verticalScrollContainer.state = state;
192-
}
193-
194176
/**
195177
* Sets the total number of records in the data source.
196178
* This property is required for remote grid virtualization to function when it is bound to remote data.

0 commit comments

Comments
 (0)