Skip to main content

DropDown Element

The DropDownElement class is utilised to create a single selection input element in a user interface.

Properties

NameTypeDescription
elementIdstringUsed to set unique ID for the element
labelstringUsed to set a label for the element
optionsList<OptionElement>Used to set options for the element
optionalboolUsed to set optional flag for the element
defaultValueStringUsed to set default value for the element

Usage

Here's how to create an instance of the DropDownElement class:

DropdownElement(
elementId: "Block",
label: "Select block" ,
options: [
OptionElement(label: "A",value: "A" ),
OptionElement(label: "B",value: "B" ),
],
)