Skip to Content

Dropdown

A dropdown selection control. Maps to a UIToolkit DropdownField.

Constructor

Creates an Dropdown element.

ParameterDescription
optionsThe list of options to display. Must not be null.
selectedIndexThe index of the currently selected option. -1 means no selection.
onChangedCallback invoked on every selection change.
labelOptional label text shown beside the dropdown.
keyAn optional key for reconciliation identity.

Properties

Label

An optional text label displayed alongside the dropdown. Null means no label is shown.

OnChanged

Callback invoked whenever the selection changes. Receives the new zero-based index as its argument.

Options

The list of string options shown in the dropdown.

SelectedIndex

The index of the currently selected option. -1 means nothing is selected.

Methods

ShouldRebuild

Last updated on