Skip to content
import ListItem from "@arcgis/core/widgets/TableList/ListItem.js";
Inheritance:
ListItemAccessor
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

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

actionsOpen

Property
Type
boolean

Indicates whether the actions panel is open in the TableList.

Default value
false

actionsSections

autocast Property
Type
Collection<Collection<Action>>

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

children

autocast Property
Type
Collection<ListItem>
Since
ArcGIS Maps SDK for JavaScript 4.32

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

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

error

readonly Property
Type
EsriError | null | undefined

The Error object returned if an error occurred.

hidden

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 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
Type
Layer | Sublayer | SubtypeSublayer | SubtypeGroupLayer

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

See also

listModeDisabled

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 4.32

Specifies whether to ignore the Layer.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.

See also
Default value
false

open

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 4.32

Whether the layer is open in the TableList.

Default value
false

panel

autocast Property
Type
ListItemPanel
Since
ArcGIS Maps SDK for JavaScript 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
Type
ListItem | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.32

The parent of this item

publishing

readonly Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 4.25

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

Default value
false

title

autocast Property
Type
string

The title of the table.

uid

readonlyinherited Property
Type
string
Inherited from: IdentifiableMixin
Since
ArcGIS Maps SDK for JavaScript 4.33

An automatically generated unique identifier assigned to the instance. The unique id is generated each time the application is loaded.

Methods

MethodSignatureClass
clone(): ListItem

clone

Method
Signature
clone (): ListItem

Creates a deep clone of this object.

Returns
ListItem

A clone of the new ListItem instance.