import LayerItem from "@arcgis/core/widgets/support/SelectionList/LayerItem.js";
Inheritance
LayerItem→ItemBase→Accessor
Since
ArcGIS Maps SDK for JavaScript 5.2

An item representing a layer with selected features in the selection list. It is used by the selection list to group the layer's FeatureItem instances and manage their selection state.

Constructors

Constructor

Constructor

Parameters

ParameterTypeDescriptionRequired
properties

Initial layer item 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.

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.

effectiveObjectIds

readonly Property
Type
ObjectId[]

Set of Object IDs for selected features. This includes filtered features.

effectiveSelection

readonly Property
Type
SelectionIdentifier[]

The effective selection for this layer item, which is a subset of the full selection based on the value of maxVisibleFeatureCountPerLayer.

expanded

Property
Type
boolean

Indicates whether the item is expanded in the selection list.

Default value
true

featureItems

Property
Type
FeatureItem[]

Set of items representing individual selected features. This will only contain a maximum number of features based on the value of maxVisibleFeatureCountPerLayer.

groupLayerItem

Property
Type
GroupLayerItem | null | undefined

A reference to the parent group layer item, if one exists.

iconName

readonlyinherited Property
Type
Icon["icon"]
Inherited from: ItemBase

Icon used to represent the item.

isTable

readonlyinherited Property
Type
boolean
Inherited from: ItemBase

Indicates this item represents a table layer.

key

readonlyinherited Property
Type
string
Inherited from: ItemBase

Unique identifier used for the item.

layer

readonly Property
Type
SelectableLayer

The companion layer view of the associated layer.

layerIsVisible

readonlyinherited Property
Type
boolean
Inherited from: ItemBase

Indicates the layer and its selected features are visible on the map.

layerView

readonlyinherited Property
Type
SelectableLayerView | null | undefined
Inherited from: ItemBase

Companion layer view of the associated layer.

maxVisibleFeatureCountExceeded

readonly Property
Type
boolean

Indicates whether the maximum number of visible feature items has been exceeded. This is based on the value of maxVisibleFeatureCountPerLayer and the current selection.

maxVisibleFeatureCountPerLayer

readonly Property
Type
number

Maximum number of selected features visible for each layer item. This does not prevent selection or affect bulk actions on the selection set.

objectIds

readonly Property
Type
ObjectId[]

Array of selected features represented by their object IDs.

selection

readonly Property
Type
SelectionIdentifier[]

Array of selected features.

title

readonlyinherited Property
Type
string | null | undefined
Inherited from: ItemBase

Text used in the interface for the item.

total

readonly Property
Type
number

Count representing the number of selected features. This value includes features hidden by local filters, but are still selected according to the associated selection manager.

view

readonlyinherited Property
Type
SelectableViewUnion | null | undefined
Inherited from: ItemBase

Convenience property for the view associated with the view model.

visible

readonly Property
Type
boolean

Indicates whether this item is visible in the list, due to one or more child items being visible.

visibleTotal

readonly Property
Type
number

Total number of visible features accounting for any filters and maxVisibleFeatureCountPerLayer.

Type definitions

RequiredConstructProperties

Type definition
Supertypes
Pick<LayerItem‚ "groupLayerItem">