Constructors
Section titled "Constructors"IgxForOfDirective
Section titled "IgxForOfDirective"new IgxForOfDirective(): IgxForOfDirective Returns IgxForOfDirective
Properties
Section titled "Properties"_virtScrollPosition
Section titled "_virtScrollPosition"Internal track for scroll top that is being virtualized
_virtScrollPosition: number = 0 Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:289
beforeViewDestroyed
Section titled "beforeViewDestroyed"beforeViewDestroyed: EventEmitter<EmbeddedViewRef<any>> Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:243
cdr: ChangeDetectorRef Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:100
chunkLoad
Section titled "chunkLoad"An event that is emitted after a new chunk has been loaded.
<ng-template igxFor [igxForOf]="data" [igxForScrollOrientation]="'horizontal'" (chunkLoad)="loadChunk($event)"></ng-template>loadChunk(e){
alert("chunk loaded!");
} chunkLoad: EventEmitter<IForOfState> Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:206
chunkPreload
Section titled "chunkPreload"An event that is emitted on chunk loading to emit the current state information - startIndex, endIndex, totalCount. Can be used for implementing remote load on demand for the igxFor data.
<ng-template igxFor [igxForOf]="data" [igxForScrollOrientation]="'horizontal'" (chunkPreload)="chunkPreload($event)"></ng-template>chunkPreload(e){
alert("chunk is loading!");
} chunkPreload: EventEmitter<IForOfState> Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:258
contentSizeChange
Section titled "contentSizeChange"An event that is emitted after the rendered content size of the igxForOf has been changed.
contentSizeChange: EventEmitter<any> Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:226
dataChanged
Section titled "dataChanged"An event that is emitted after data has been changed.
<ng-template igxFor [igxForOf]="data" [igxForScrollOrientation]="'horizontal'" (dataChanged)="dataChanged($event)"></ng-template>dataChanged(e){
alert("data changed!");
} dataChanged: EventEmitter<IForOfDataChangeEventArgs> Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:240
igxForContainerSize
Section titled "igxForContainerSize"Sets the px-affixed size of the container along the axis of scrolling. For "horizontal" orientation this value is the width of the container and for "vertical" is the height.
<ng-template igxFor let-item [igxForOf]="data" [igxForContainerSize]="'500px'"
[igxForScrollOrientation]="'horizontal'">
</ng-template> igxForContainerSize: any Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:174
igxForItemSize
Section titled "igxForItemSize"Sets the px-affixed size of the item along the axis of scrolling. For "horizontal" orientation this value is the width of the column and for "vertical" is the height or the row.
<ng-template igxFor let-item [igxForOf]="data" [igxForScrollOrientation]="'horizontal'" [igxForItemSize]="'50px'"></ng-template> igxForItemSize: any Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:192
igxForScrollContainer
Section titled "igxForScrollContainer"Optionally pass the parent igxFor instance to create a virtual template scrolling both horizontally and vertically.
<ng-template #scrollContainer igxFor let-rowData [igxForOf]="data"
[igxForScrollOrientation]="'vertical'"
[igxForContainerSize]="'500px'"
[igxForItemSize]="'50px'"
let-rowIndex="index">
<div [style.display]="'flex'" [style.height]="'50px'">
<ng-template #childContainer igxFor let-item [igxForOf]="data"
[igxForScrollOrientation]="'horizontal'"
[igxForScrollContainer]="parentVirtDir"
[igxForContainerSize]="'500px'">
<div [style.min-width]="'50px'">{{rowIndex}} : {{item.text}}</div>
</ng-template>
</div>
</ng-template> igxForScrollContainer: any Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:162
igxForScrollOrientation
Section titled "igxForScrollOrientation"Specifies the scroll orientation. Scroll orientation can be "vertical" or "horizontal".
<ng-template igxFor let-item [igxForOf]="data" [igxForScrollOrientation]="'horizontal'"></ng-template> igxForScrollOrientation: string = 'vertical' Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:140
igxForSizePropName
Section titled "igxForSizePropName"Sets the property name from which to read the size in the data object.
igxForSizePropName: any Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:130
state
Section titled "state"The current state of the directive. It contains startIndex and chunkSize.
state.startIndex - The index of the item at which the current visible chunk begins.
state.chunkSize - The number of items the current visible chunk holds.
These options can be used when implementing remote virtualization as they provide the necessary state information.
const gridState = this.parentVirtDir.state; state: IForOfState Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:274
Accessors
Section titled "Accessors"displayContainer
Section titled "displayContainer"get displayContainer(): HTMLElement | undefined Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:357
Returns HTMLElement | undefined
igxForOf
Section titled "igxForOf"Sets the data to be rendered.
<ng-template igxFor let-item [igxForOf]="data" [igxForScrollOrientation]="'horizontal'"></ng-template> get igxForOf(): U & T[] | null Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:115
Returns U & T[] | null
set igxForOf(value: U & T[] | null): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:119
Parameters
- value:
U & T[] | null
Returns void
igxForTotalItemCount
Section titled "igxForTotalItemCount"The total count of the virtual data items, when using remote service. Similar to the property totalItemCount, but this will allow setting the data count into the template.
<ng-template igxFor let-item [igxForOf]="data | async" [igxForTotalItemCount]="count | async"
[igxForContainerSize]="'500px'" [igxForItemSize]="'50px'"></ng-template> get igxForTotalItemCount(): number Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:325
Returns number
set igxForTotalItemCount(value: number): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:328
Parameters
- value:
number
Returns void
igxForTrackBy
Section titled "igxForTrackBy"Gets the function used to track changes in the items collection. By default the object references are compared. However this can be optimized if you have unique identifier value that can be used for the comparison instead of the object ref or if you have some other property values in the item object that should be tracked for changes. This option is similar to ngForTrackBy.
const trackFunc = this.parentVirtDir.igxForTrackBy; get igxForTrackBy(): TrackByFunction<T> Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:1226
Returns TrackByFunction<T>
Sets the function used to track changes in the items collection. This function can be set in scenarios where you want to optimize or customize the tracking of changes for the items in the collection. The igxForTrackBy function takes the index and the current item as arguments and needs to return the unique identifier for this item.
this.parentVirtDir.igxForTrackBy = (index, item) => {
return item.id + item.width;
}; set igxForTrackBy(fn: TrackByFunction<T>): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:1241
Parameters
- fn:
TrackByFunction<T>
Returns void
scrollPosition
Section titled "scrollPosition"Gets/Sets the scroll position.
const position = directive.scrollPosition;
directive.scrollPosition = value; get scrollPosition(): number Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:380
Returns number
set scrollPosition(val: number): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:383
Parameters
- val:
number
Returns void
totalItemCount
Section titled "totalItemCount"The total count of the virtual data items, when using remote service.
this.parentVirtDir.totalItemCount = data.Count; get totalItemCount(): number Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:338
Returns number
set totalItemCount(val: number): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:342
Parameters
- val:
number
Returns void
virtualHelper
Section titled "virtualHelper"get virtualHelper(): HTMLElement Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:361
Returns HTMLElement
Methods
Section titled "Methods"addScroll
Section titled "addScroll"Shifts the scroll thumb position.
this.parentVirtDir.addScroll(5); addScroll(add: number): boolean Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:674
Parameters
- add:
numbernegative value to scroll previous and positive to scroll next;
Returns boolean
addScrollTop
Section titled "addScrollTop"Shifts the scroll thumb position.
this.parentVirtDir.addScroll(5); addScrollTop(add: number): boolean Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:662
Parameters
- add:
number
Returns boolean
getIndexAtScroll
Section titled "getIndexAtScroll"Returns the index of the element at the specified offset.
this.parentVirtDir.getIndexAtScroll(100); getIndexAtScroll(scrollOffset: number): number Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:858
Parameters
- scrollOffset:
number
Returns number
getItemCountInView
Section titled "getItemCountInView"Returns the total number of items that are fully visible.
this.parentVirtDir.getItemCountInView(); getItemCountInView(): number Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:802
Returns number
getScroll
Section titled "getScroll"Returns a reference to the scrollbar DOM element. This is either a vertical or horizontal scrollbar depending on the specified igxForScrollOrientation.
dir.getScroll(); getScroll(): HTMLElement Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:819
Returns HTMLElement
getScrollForIndex
Section titled "getScrollForIndex"Returns the scroll offset of the element at the specified index.
this.parentVirtDir.getScrollForIndex(1); getScrollForIndex(index: number, bottom: boolean): number Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:846
Parameters
- index:
number - bottom:
boolean
Returns number
getSizeAt
Section titled "getSizeAt"Returns the size of the element at the specified index.
this.parentVirtDir.getSizeAt(1); getSizeAt(index: number): number Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:828
Parameters
- index:
number
Returns number
isIndexOutsideView
Section titled "isIndexOutsideView"Returns whether the target index is outside the view.
this.parentVirtDir.isIndexOutsideView(10); isIndexOutsideView(index: number): boolean | 0 Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:867
Parameters
- index:
number
Returns boolean | 0
isScrollable
Section titled "isScrollable"isScrollable(): boolean Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:430
Returns boolean
ngAfterViewInit
Section titled "ngAfterViewInit"A callback method that is invoked immediately after Angular has completed initialization of a component's view. It is invoked only once when the view is instantiated.
ngAfterViewInit(): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:525
Returns void
scrollNext
Section titled "scrollNext"Scrolls by one item into the appropriate next direction. For "horizontal" orientation that will be the right column and for "vertical" that is the lower row.
this.parentVirtDir.scrollNext(); scrollNext(): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:749
Returns void
scrollNextPage
Section titled "scrollNextPage"Scrolls by one page into the appropriate next direction. For "horizontal" orientation that will be one view to the right and for "vertical" that is one view to the bottom.
this.parentVirtDir.scrollNextPage(); scrollNextPage(): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:773
Returns void
scrollPrev
Section titled "scrollPrev"Scrolls by one item into the appropriate previous direction. For "horizontal" orientation that will be the left column and for "vertical" that is the upper row.
this.parentVirtDir.scrollPrev(); scrollPrev(): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:762
Returns void
scrollPrevPage
Section titled "scrollPrevPage"Scrolls by one page into the appropriate previous direction. For "horizontal" orientation that will be one view to the left and for "vertical" that is one view to the top.
this.parentVirtDir.scrollPrevPage(); scrollPrevPage(): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:784
Returns void
scrollTo
Section titled "scrollTo"Scrolls to the specified index.
this.parentVirtDir.scrollTo(5); scrollTo(index: number): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:722
Parameters
- index:
number
Returns void
verticalScrollHandler
Section titled "verticalScrollHandler"verticalScrollHandler(event: any): void Defined in projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts:426
Parameters
- event:
any