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

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

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

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.

error

Property
error Errorreadonly

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;

layer

Property
layer Layer

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

panel

Property
panel ListItemPanel
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"
    };
  }
});

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.