require(["esri/widgets/TableList/ListItem"], (TableListItem) => { /* code goes here */ });
import TableListItem from "@arcgis/core/widgets/TableList/ListItem.js";
esri/widgets/TableList/ListItem
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 | 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 | ListItem | ||
The title of the table. | ListItem |
Property Details
-
actionsOpen
actionsOpen Boolean
-
Indicates whether the actions panel is open in the TableList.
- Default Value:false
-
actionsSections
actionsSections Collection<Collection<(ActionButton|ActionToggle)>>autocast
-
A nested 2-dimensional collection of actions that could be triggered on the item.
-
error
error Errorreadonly
-
The Error object returned if an error occurred.
-
hidden
hidden Boolean
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
ExamplelistItem.hidden = true;
-
layer
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
panel ListItemPanel
Since: ArcGIS Maps SDK for JavaScript 4.29ListItem 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
publishing Booleanreadonly
Since: ArcGIS Maps SDK for JavaScript 4.25ListItem since 4.17, publishing added at 4.25. -
Value is
true
when the layer is being published. Value will befalse
if the layer is not being published or checkPublishStatusEnabled isfalse
.- Default Value:false
-
title
title String
-
The title of the table.
Method Overview
Name | Return Type | Summary | Class |
---|---|---|---|
Creates a deep clone of this object. | ListItem |