Types
import type { ArcgisValuePickerSubcomponent, AnimateEvent, LabelItem, ComboboxItem, Layout } from "@arcgis/common-components/components/arcgis-value-picker/types.js";

Type definitions

ArcgisValuePickerSubcomponent

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.2

The minimum API required for components being slotted into arcgis-value-picker. Value Picker will automatically create an internal reference to the slotted component, so the properties on this interface can be directly referenced without requiring the the Value Picker component to be aware of the slotted component's unique API. For example, if the user presses play and eventually Value Picker determines that slottedComponent.canNext is false but arcgis-value-picker.loop is true, Value Picker will call slottedComponent.reset() to reset the slotted component's current value to the first index of its dataset. This will allow playback to continue looping seamlessly.

Supertypes
HTMLElement

canNext

Property
Type
boolean

Indicates whether the component may advance to the next index of its data set. This value is recalculated after the component is interacted with so the arcgis-value-picker buttons give the user immediate feedback regarding what interactions are permitted next.

canPlay

Property
Type
boolean

Indicates whether the component may begin playing. This value is recalculated after the component is interacted with so the arcgis-value-picker buttons give the user immediate feedback regarding what interactions are permitted next.

canPrevious

Property
Type
boolean

Indicates whether the component may step backwards to the previous index of its data set. This value is recalculated after the component is interacted with so the arcgis-value-picker buttons give the user immediate feedback regarding what interactions are permitted next.

step

Property
Type
(direction: "next" | "previous") => void

Function used to change the currently selected value. Pressing the next button will call step("next"), and pressing the previous button will call step("previous").

reset

Property
Type
() => void

Function used to reset the currently selected value to the first element of the slotted component's dataset. This method is called automatically when arcgis-value-picker.loop is true and the selected value index reaches the end of the dataset. Additionally, if arcgis-value-picker.loop is false and the play button is clicked while the index is at the last element of the slotted component's dataset, Value Picker will call reset() on the slotted component and play through all elements once.

AnimateEvent

Type definition

first

Property
Type
boolean

Denotes whether the event is firing for the first time since the play button was pressed.

LabelItem

Type definition

value

Property
Type
string

The value of the item.

label

Property
Type
string

The label users will see for this item.

ComboboxItem

Type definition

Object used to define the combobox items.

value

Property
Type
string

The value of the item.

label

Property
Type
string

The label users will see for this item.

Layout

Type definition

Indicates the axis the component should be oriented along.

Type
"horizontal" | "vertical"

IconName

Type definition
Type
Icon["icon"]