▾
import "@arcgis/common-components/components/arcgis-value-picker-combobox";- Inheritance
- ArcgisValuePickerCombobox→
HTMLElement
Demo
Properties
| Property | Attribute | Type |
|---|---|---|
| auto-destroy-disabled | ||
| can-next | ||
| can-play | ||
| can-previous | ||
| | ||
| disabled | ||
| |
autoDestroyDisabled
- Type
- boolean
If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy() method when you are done to prevent memory leaks.
- Attribute
- auto-destroy-disabled
- Default value
- false
canNext
- Type
- boolean
Determines whether the user can interact with the next button.
This property is automatically set to false when currentValue matches the last index of
items.
- Attribute
- can-next
- Default value
- false
- Example
- const valuePicker = document.querySelector("arcgis-value-picker");const valuePickerCombobox = document.querySelector("arcgis-value-picker-combobox");valuePickerCombobox.items = [{ value: "ind", label: "Industrial" },{ value: "res", label: "Residential" },{ value: "com", label: "Commercial" }];valuePickerCombobox.currentValue = valuePickerCombobox.items[0];if (valuePickerCombobox.canNext === true) {valuePicker.next();console.log(valuePickerCombobox.currentValue.label); // "Residential"}
canPlay
- Type
- boolean
Determines whether the user can interact with the play/pause button.
- Attribute
- can-play
- Default value
- false
canPrevious
- Type
- boolean
Determines whether the user can interact with the previous button.
This property is automatically set to false when currentValue matches the first index of
items.
- Attribute
- can-previous
- Default value
- false
- Example
- const valuePicker = document.querySelector("arcgis-value-picker");const valuePickerCombobox = document.querySelector("arcgis-value-picker-combobox");valuePickerCombobox.items = [{ value: "ind", label: "Industrial" },{ value: "res", label: "Residential" },{ value: "com", label: "Commercial" }];valuePickerCombobox.currentValue = valuePickerCombobox.items[1];if (valuePickerCombobox.canPrevious === true) {valuePicker.previous();console.log(valuePickerCombobox.currentValue.label); // "Industrial"}
currentValue
- Type
- ComboboxItem | undefined
The currently selected combobox item rendered by the component.
disabled
- Type
- boolean
When true, the component is visually withdrawn and cannot receive user interaction.
- Attribute
- disabled
- Default value
- false
items
- Type
- ComboboxItem[] | undefined
The array of combobox items that arcgis-value-picker can iterate over.
Methods
| Method | Signature |
|---|---|
| inherited | componentOnReady(): Promise<this> |
| destroy(): Promise<void> |
componentOnReady
- Signature
-
componentOnReady (): Promise<this>
Creates a promise that resolves once the component is fully loaded.
- Returns
- Promise<this>
- Example
- const arcgisValuePickerCombobox = document.createElement("arcgis-value-picker-combobox");document.body.append(arcgisValuePickerCombobox);await arcgisValuePickerCombobox.componentOnReady();console.log("arcgis-value-picker-combobox is ready to go!");
Events
| Name | Type |
|---|---|
| CustomEvent<{ name: "canNext" | "canPlay" | "canPrevious" | "currentValue"; }> |
arcgisPropertyChange
arcgisPropertyChange: CustomEvent<{ name: "canNext" | "canPlay" | "canPrevious" | "currentValue"; }>