import Item from "@arcgis/core/layerList/Item.js";
Inheritance
Item→Accessor
Since
ArcGIS Maps SDK for JavaScript 5.2
beta

Represents the state of one entry in a layer-list workflow.

An item can represent a layer, a track-info part, or a video telemetry-display element. It exposes associated layer and layer-view state, supports nested child items, and stores action and panel state for consumer UIs.

To hide a layer entry based on layer configuration, set Layer.listMode to hide on the corresponding layer.

See also

Constructors

Constructor

Constructor

Parameters

ParameterTypeDescriptionRequired
properties

The properties used to configure the item.

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.

actionsExpanded

Property
Type
boolean

Indicates whether the item's action sections are expanded in a consumer UI.

Default value
false

actionsOpen

Property
Type
boolean

Backward-compatible alias of actionsExpanded.

actionsSections

autocast Property
Type
Collection<Collection<Action>>

A collection of action sections that can be triggered on the item. Each section is rendered as a separate group by consumer UIs.

checkPublishStatusEnabled

Property
Type
boolean

Enables publish-status checks used by publishing. When enabled, the item observes the associated layer's publishing status.

Default value
false

children

autocast Property
Type
Collection<Item>

The child items belonging to this item. Children can represent nested layers, track-info parts, or telemetry-display elements.

childrenSortable

Property
Type
boolean

Indicates whether the item's child layers can be sorted or moved within their parent collection. This does not affect track-info or telemetry-display children.

Default value
true
Example
// disables the children of a parent list item from being sorted
listItem.childrenSortable = false;

connectionStatus

readonly Property
Type
ConnectedLayerView["connectionStatus"] | null | undefined

The connection status of the associated StreamLayer when its layer view exposes StreamLayerView.connectionStatus. This status takes precedence over updating for stream layers.

content

Property
Type
ItemContent

Identifies the content represented by this item: a layer, a track-info part, or a telemetry-display element.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

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

error

readonly Property
Type
EsriError | null | undefined

The error reported while loading the associated layer, if any.

expanded

Property
Type
boolean

Indicates whether this item's details are expanded in a consumer UI.

Default value
false

hidden

Property
Type
boolean

Indicates whether consumer UIs should hide this item.

This is an alternative to Layer.listMode, which hides a layer based on layer configuration.

Default value
false

incompatible

readonly Property
Type
boolean

Indicates whether the associated layer view does not support the current view's spatial reference.

Default value
false

layer

Property
Type
Layer | Sublayer | SubtypeSublayer | SubtypeGroupLayer | null

The layer represented by this item.

layerView

readonly Property
Type
LayerView | SpatiallyReferencedLayerView | ConnectedLayerView | null | undefined

The LayerView displaying the associated layer, if available. Subtype and sublayer items resolve to the layer view of their root layer where applicable.

listItemCreatedFunction

Property
Type
ItemModifier | null | undefined

A function called when the item is created. Use the callback to customize supported item properties or add actions and panel state.

listModeDisabled

Property
Type
boolean

Indicates whether to ignore the Layer.listMode property of child layers. When true, child inclusion is controlled externally instead of by each child's listMode value.

See also
Default value
false

open

Property
Type
boolean

Backward-compatible alias of expanded.

panel

autocast Property
Type
ItemPanel

Additional panel state associated with this item. The panel is stored as state and can be rendered by a separate consumer UI.

parent

Property
Type
Item | null | undefined

The parent item, if this item is nested.

publishing

readonly Property
Type
boolean

Indicates whether layer is being published. The value is false when the layer is not publishing or checkPublishStatusEnabled is false.

Default value
false

sortable

Property
Type
boolean

Indicates whether this item can be sorted or moved within its parent collection. Items that represent track-info or telemetry-display content are not sortable.

Default value
true
Example
// disables the list item from being sorted
listItem.sortable = false;

state

readonly Property
Type
State

The overall state of this item for consumer UIs. Returns disabled when the item has no layer, is hidden, or is incompatible with the view; loading while the layer or layer view is updating; and ready otherwise.

title

autocast Property
Type
string

The title displayed for this item. Layer items use the associated layer title, while display items use a consumer-defined title.

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.

updating

readonly Property
Type
boolean

Indicates whether the layer or its layer view is updating, for example while data is being fetched. Publishing and stream connection status take precedence over the layer's updating state.

Default value
false

view

Property
Type
MapViewOrSceneView | null | undefined

The map or scene view that provides context for this item and its layer view.

visibilityMode

readonly Property
Type
ItemVisibilityMode

Specifies how visibility is managed for this item's child layers.

visible

Property
Type
boolean

Indicates whether this item is visible. For layer items, this controls the associated layer. For track-info and telemetry-display items, it controls the represented display element.

Default value
true

visibleAtCurrentScale

readonly Property
Type
boolean

Indicates whether the associated layer is visible at the current view scale.

Default value
true

visibleAtCurrentTimeExtent

readonly Property
Type
boolean

Indicates whether the associated layer is visible at the current time extent.

Default value
true

Methods

MethodSignatureClass
clone(): Item
toggleVisibility(value?: boolean): boolean

clone

Method
Signature
clone (): Item

Creates a deep clone of this item, including its child items and action sections.

Returns
Item

A clone of the new Item instance.

toggleVisibility

Method
Signature
toggleVisibility (value?: boolean): boolean

Sets or toggles the visibility of the represented content. For layer items, this updates the associated layer. For track-info and telemetry-display items, it updates the represented display element.

If value is provided, visibility is set to that value. Otherwise, visibility is inverted.

Parameters

ParameterTypeDescriptionRequired
value

Optional target visibility value.

Returns
boolean

The resulting visibility value.