enableVirtualization

fields

It is used to map keys from the dataSource which extracts the appropriate data from the dataSource
with specified mapped with the column fields to render the ListView.
{% codeBlock src=“listview/fields-api/index.ts” %}{% endcodeBlock %}

Defaults to ListBase.defaultMappedFields

groupTemplate

string

The ListView has an option to custom design the group header title with the help of groupTemplate property.
Refer the documentation [here]
(./listview/customizing-templates#group-template)
to know more about this property with demo.
{% codeBlock src=“listview/grouptemplate-api/index.ts” %}{% endcodeBlock %}

Defaults to null

headerTemplate

string

The ListView has an option to custom design the ListView header title with the help of headerTemplate property.
Refer the documentation [here]
(./listview/customizing-templates#header-template)
to know more about this property with demo.
{% codeBlock src=“listview/headertemplate-api/index.ts” %}{% endcodeBlock %}

Defaults to null

headerTitle

string

It is used to set the title of ListView component.
{% codeBlock src=“listview/fields-api/index.ts” %}{% endcodeBlock %}

Defaults to ""

height

number | string

It is used to set the height of the ListView component.

Defaults to ”

htmlAttributes

Object

Defines the HTML attributes such as id, class, etc., for the ListView.

Defaults to {}

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to ”

query

Query

It is used to fetch the specific data from dataSource by using where, select key words.
Refer the documentation [here]
(./data-binding#bind-to-remote-data)
to know more about this property with demo.
{% codeBlock src=“listview/query-api/index.ts” %}{% endcodeBlock %}

Defaults to null

showCheckBox

boolean

Using this property, we can show or hide the checkbox.
{% codeBlock src=“listview/showcheckbox-api/index.ts” %}{% endcodeBlock %}

Defaults to false

showHeader

boolean

Using this property, we can show or hide the header of ListView component.
{% codeBlock src=“listview/fields-api/index.ts” %}{% endcodeBlock %}

Defaults to false

showIcon

boolean

Using this property, we can show or hide the icon of list item.
{% codeBlock src=“listview/showicon-api/index.ts” %}{% endcodeBlock %}

Defaults to false

sortOrder

string

It is used to enable the sorting of list items to be ascending or descending.
{% codeBlock src=“listview/sortorder-api/index.ts” %}{% endcodeBlock %}

Defaults to ‘None’

template

string

The ListView supports to customize the content of each list items with the help of template property.
Refer the documentation here
to know more about this property with demo.
{% codeBlock src=“listview/template-api/index.ts” %}{% endcodeBlock %}

Defaults to null

width

number | string

It sets the width to the ListView component.

Defaults to ”

Methods

addEventListener

Adds the handler to the given event listener.

Returns void

addItem

It adds new item to current ListView.
To add a new item in the list view, we need to pass ‘data’ as array or object and ‘fields’ as object.
For example fields: { text: ‘Name’, tooltip: ‘Name’, id:‘id’}