AMD:
require(["esri/widgets/ValuePicker/ValuePickerCombobox"], (ValuePickerCombobox) => { /* code goes here */ });
ESM:
import ValuePickerCombobox from "@arcgis/core/widgets/ValuePicker/ValuePickerCombobox.js";
Class:
esri/widgets/ValuePicker/ValuePickerCombobox
Since: ArcGIS Maps SDK for JavaScript 4.27
This class represents a searchable combobox list component that can be assigned to a component property of the ValuePicker widget. See Using the combobox component to present selectable items section for more information how to set this up.
Example
// Create a ValuePicker widget with a combobox component.
const valuePicker = new ValuePicker({
component: new ValuePickerCombobox({
placeholder: "Pick Zoning Type",
items: [
{ value: "ind", label: "Industrial" },
{ value: "res", label: "Residential" },
{ value: "com", label: "Commercial" }
]
}),
values: ["res"]
});
Constructors
-
Parameterproperties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class |
---|---|---|---|
An array of combobox items. | ValuePickerCombobox | ||
Combobox label. | ValuePickerCombobox | ||
Combobox placeholder text. | ValuePickerCombobox | ||
For ValuePickerCombobox the type is always "combobox". | ValuePickerCombobox |
Property Details
-
items
items ComboboxItem[]
-
An array of combobox items.
- Default Value:null
Example// Create a ValuePicker with a zip code combobox component. const valuePicker = new ValuePicker({ component: new ValuePickerCombobox({ placeholder: "Pick a Zip Code", items: [ { value: "90606", label: "Whittier, CA (90606)" }, { value: "76001", label: "Arlington, TX (76001)" }, { value: "92335", label: "Fontana, CA (92335)" } ] }), values: ["90606"] });
-
label
label String
-
Combobox label.
- Default Value:"ValuePickerCombobox"
- See also
-
placeholder
placeholder String
-
Combobox placeholder text.
- Default Value:null
- See also
-
type
type Stringreadonly
-
For ValuePickerCombobox the type is always "combobox".