import ListItem from "@arcgis/core/widgets/TableList/ListItem.js";const ListItem = await $arcgis.import("@arcgis/core/widgets/TableList/ListItem.js");- Inheritance:
- ListItem→
Accessor
- 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
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
| | ||
| | ||
declaredClass readonly inherited | ||
error readonly | | |
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
publishing readonly | | |
| | ||
uid readonly inherited |
actionsOpen
- Type
- boolean
Indicates whether the actions panel is open in the TableList.
- Default value
- false
actionsSections
- Type
- Collection<Collection<Action>>
A nested 2-dimensional collection of actions that could be triggered on the item.
children
- 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.
hidden
- 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
- 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
- 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
- Type
- boolean
- Since
- ArcGIS Maps SDK for JavaScript 4.32
Whether the layer is open in the TableList.
- Default value
- false
panel
- 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 LayerListconst tableList = new TableList({ view: view, listItemCreatedFunction: (event) =>{ const { item } = event; item.panel = { content: document.getElementById("myDiv"), icon: "graph-bar" }; }}); publishing
- 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
uid
- Type
- string
- 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.