Class IgxListComponent

Displays a collection of data items in a templatable list format

IgxListModule

igx-list-theme

list, data

Grids & Lists

The Ignite UI List displays rows of items and supports one or more header items as well as search and filtering of list items. Each list item is completely templatable and will support any valid HTML or Angular component.

<igx-list>
<igx-list-item isHeader="true">Contacts</igx-list-item>
<igx-list-item *ngFor="let contact of contacts">
<span class="name">{{ contact.name }}</span>
<span class="phone">{{ contact.phone }}</span>
</igx-list-item>
</igx-list>

Hierarchy

Hierarchy

  • IgxListBaseDirective
    • IgxListComponent

Constructors

Properties

allowLeftPanning: boolean = false

Sets/gets whether the left panning of an item is allowed.

Default value is false.

<igx-list [allowLeftPanning]="true"></igx-list>
let isLeftPanningAllowed = this.list.allowLeftPanning;
allowRightPanning: boolean = false

Sets/gets whether the right panning of an item is allowed.

Default value is false.

<igx-list [allowRightPanning]="true"></igx-list>
let isRightPanningAllowed = this.list.allowRightPanning;
children: QueryList<IgxListItemComponent>

Returns a collection of all items and headers in the list.

let listChildren: QueryList = this.list.children;
dataLoadingTemplate: IgxDataLoadingTemplateDirective

Sets/gets the list loading template.

This template is used by IgxList in case there are no list items defined and isLoading is set to true.

<igx-list>
<ng-template igxDataLoading>
<p>Patience, we are currently loading your data...</p>
</ng-template>
</igx-list>
let loadingTemplate = this.list.dataLoadingTemplate;
element: ElementRef<any>

Sets/gets the empty list template.

This template is used by IgxList in case there are no list items defined and isLoading is set to false.

<igx-list>
<ng-template igxEmptyList>
<p class="empty">No contacts! :(</p>
</ng-template>
</igx-list>
let emptyTemplate = this.list.emptyListTemplate;
endPan: EventEmitter<IListItemPanningEventArgs> = ...

Event emitted when a pan gesture is completed or canceled.

Provides a reference to an object of type IListItemPanningEventArgs as an event argument.

<igx-list (endPan)="endPan($event)"></igx-list>
id: string = ...

Sets/gets the id of the list.

If not set, the id of the first list component will be "igx-list-0".

<igx-list id="my-first-list"></igx-list>
let listId = this.list.id;
isLoading: boolean = false

Sets/gets whether the list is currently loading data.

Set it to display the dataLoadingTemplate while data is being retrieved. Default value is false.

 <igx-list [isLoading]="true"></igx-list>
let isLoading = this.list.isLoading;
itemClicked: EventEmitter<IListItemClickEventArgs> = ...

Event emitted when a list item is clicked.

Provides references to the IgxListItemComponent and Event as event arguments.

<igx-list (itemClicked)="onItemClicked($event)"></igx-list>
leftPan: EventEmitter<IListItemPanningEventArgs> = ...

Event emitted when a left pan gesture is executed on a list item.

Provides a reference to an object of type IListItemPanningEventArgs as an event argument.

<igx-list [allowLeftPanning]="true" (leftPan)="leftPan($event)"></igx-list>
listItemLeftPanningTemplate: IgxListItemLeftPanningTemplateDirective

Sets/gets the template for left panning a list item.

Default value is null.

<igx-list [allowLeftPanning]="true">
<ng-template igxListItemLeftPanning>
<igx-icon>delete</igx-icon>Delete
</ng-template>
</igx-list>
let itemLeftPanTmpl = this.list.listItemLeftPanningTemplate;
listItemRightPanningTemplate: IgxListItemRightPanningTemplateDirective

Sets/gets the template for right panning a list item.

Default value is null.

<igx-list [allowRightPanning] = "true">
<ng-template igxListItemRightPanning>
<igx-icon>call</igx-icon>Dial
</ng-template>
</igx-list>
let itemRightPanTmpl = this.list.listItemRightPanningTemplate;
panEndTriggeringThreshold: number = 0.5

Provides a threshold after which the item's panning will be completed automatically.

By default this property is set to 0.5 which is 50% of the list item's width.

<igx-list [panEndTriggeringThreshold]="0.8"></igx-list>
panStateChange: EventEmitter<IPanStateChangeEventArgs> = ...

Event emitted when a pan gesture is executed on a list item.

Provides references to the IgxListItemComponent and IgxListPanState as event arguments.

<igx-list (panStateChange)="panStateChange($event)"></igx-list>
resetPan: EventEmitter<IgxListComponent> = ...

Event emitted when a pan item is returned to its original position.

Provides a reference to an object of type IgxListComponent as an event argument.

<igx-list (resetPan)="resetPan($event)"></igx-list>
rightPan: EventEmitter<IListItemPanningEventArgs> = ...

Event emitted when a right pan gesture is executed on a list item.

Provides a reference to an object of type IListItemPanningEventArgs as an event argument.

<igx-list [allowRightPanning]="true" (rightPan)="rightPan($event)"></igx-list>
startPan: EventEmitter<IListItemPanningEventArgs> = ...

Event emitted when a pan gesture is started.

Provides a reference to an object of type IListItemPanningEventArgs as an event argument.

<igx-list (startPan)="startPan($event)"></igx-list>

Accessors

  • get context(): any
  • Gets the context object of the template binding.

    Gets the context object which represents the template context binding into the list container by providing the $implicit declaration which is the IgxListComponent itself.

    let listComponent =  this.list.context;
    

    Returns any