Class IgxListComponent

Displays a collection of data items in a templatable list format

igxmodule

IgxListModule

igxtheme

igx-list-theme

igxkeywords

list, data

igxgroup

Grids & Lists

remarks

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.

example
<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

  • IgxListBaseDirective
    • IgxListComponent

Index

Constructors

Properties

allowLeftPanning: boolean = false

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

remarks

Default value is false.

example
<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.

remarks

Default value is false.

example
<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.

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

Sets/gets the list loading template.

remarks

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

example
<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.

remarks

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

example
<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.

remarks

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

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

Sets/gets the id of the list.

remarks

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

example
<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.

remarks

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

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

Event emitted when a list item is clicked.

remarks

Provides references to the IgxListItemComponent and Event as event arguments.

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

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

remarks

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

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

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

remarks

Default value is null.

example
<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.

remarks

Default value is null.

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

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

remarks

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

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

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

remarks

Provides references to the IgxListItemComponent and IgxListPanState as event arguments.

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

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

remarks

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

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

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

remarks

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

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

Event emitted when a pan gesture is started.

remarks

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

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

Accessors

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

    remark

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

    example
    let listComponent =  this.list.context;
    

    Returns any

  • get isListEmpty(): boolean
  • get role(): string
  • get template(): TemplateRef<any>

Methods

  • ngDoCheck(): void