ListItem

AMD: require(["esri/widgets/TableList/ListItem"], (TableListItem) => { /* code goes here */ });
ESM: import TableListItem from "@arcgis/core/widgets/TableList/ListItem.js";
Class: esri/widgets/TableList/ListItem
Since: ArcGIS Maps SDK for JavaScript 4.17

In the TableList widget UI, the ListItem represents a layer's table added to the widget. It provides access to the associated properties and allows the developer to configure actions related to the table, and allows the developer to add content to the item related to the table.

See also

Property Overview

Name Type Summary Class

Indicates whether the actions panel is open in the TableList.

ListItem

A nested 2-dimensional collection of actions that could be triggered on the item.

ListItem

When a layer contains sublayers, this property is a Collection of ListItem objects belonging to the given layer.

ListItem

The Error object returned if an error occurred.

ListItem

When true, hides the layer from the TableList instance.

ListItem

The layer associated with the triggered action.

ListItem

Specifies whether to ignore the listMode property of the child layers in the list item.

ListItem

Whether the layer is open in the TableList.

ListItem

Allows you to display custom content for each ListItem in the TableList widget.

ListItem

The parent of this item

ListItem

Value is true when the layer is being published.

ListItem

The title of the table.

ListItem

Property Details

actionsOpen

Property
actionsOpen Boolean

Indicates whether the actions panel is open in the TableList.

Default Value:false

actionsSections

Property
actionsSections Collection<Collection<(ActionButton|ActionToggle)>>autocast
Autocasts from Object[][]

A nested 2-dimensional collection of actions that could be triggered on the item.

children

Property
children Collection<ListItem>autocast
Since: ArcGIS Maps SDK for JavaScript 4.32 ListItem since 4.17, children added at 4.32.

When a layer contains sublayers, this property is a Collection of ListItem objects belonging to the given layer.

error

Property
error Error |null |undefinedreadonly

The Error object returned if an error occurred.

hidden

Property
hidden Boolean
Since: ArcGIS Maps SDK for JavaScript 4.24 ListItem since 4.17, hidden added at 4.24.

When true, hides the layer from the TableList instance. This is an alternative to Layer.listMode, which hides a layer from all instances of TableList that include the layer.

Default Value:false
Example
listItem.hidden = true;

The layer associated with the triggered action. This must be a FeatureLayer whose isTable property returns true. For more information regarding working with tables, please refer to Map.tables.

Default Value:null
See also

listModeDisabled

Property
listModeDisabled Boolean
Since: ArcGIS Maps SDK for JavaScript 4.32 ListItem since 4.17, listModeDisabled added at 4.32.

Specifies whether to ignore the listMode property of the child layers in the list item. A common use case for listModeDisabled is when you want to use the TableList to manage and configure a layer's listMode value.

Default Value:false
See also

open

Property
open Boolean
Since: ArcGIS Maps SDK for JavaScript 4.32 ListItem since 4.17, open added at 4.32.

Whether the layer is open in the TableList.

Default Value:false

panel

Property
panel ListItemPanelautocast
Since: ArcGIS Maps SDK for JavaScript 4.29 ListItem since 4.17, panel added at 4.29.

Allows you to display custom content for each ListItem in the TableList widget.

Example
// displays content from the DOM in the LayerList
const tableList = new TableList({
  view: view,
  listItemCreatedFunction: (event) =>{
    const { item } = event;
    item.panel = {
      content: document.getElementById("myDiv"),
      icon: "graph-bar"
    };
  }
});

parent

Property
parent ListItem |null |undefined
Since: ArcGIS Maps SDK for JavaScript 4.32 ListItem since 4.17, parent added at 4.32.

The parent of this item

Default Value:null

publishing

Property
publishing Booleanreadonly
Since: ArcGIS Maps SDK for JavaScript 4.25 ListItem since 4.17, publishing added at 4.25.

Value is true when the layer is being published. Value will be false if the layer is not being published or checkPublishStatusEnabled is false.

Default Value:false

title

Property
title String

The title of the table.

Method Overview

Name Return Type Summary Class

Creates a deep clone of this object.

ListItem

Method Details

clone

Method
clone(){ListItem}

Creates a deep clone of this object.

Returns
Type Description
ListItem A clone of the new ListItem instance.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close