DropdownListTileSchema

@Serializable
@SerialName(value = "DropdownList")
data class DropdownListTileSchema(val id: String, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val visibility: TileSchema.Visibility, val expanded: Boolean, val options: SerializableImmutableList<DropdownListTileSchema.SelectOption>, val selectedOptionId: String, val enabled: Boolean, val kind: DropdownListTileSchema.Kind, val supportingText: String?, val state: DropdownListTileSchema.State) : TileSchema

Renders a Material 3 ExposedDropdownMenuBox: a read-only anchor field showing the label of the currently selected option, plus a dropdown listing every entry in options. kind picks the anchor composable — Kind.FILLEDTextField, Kind.OUTLINEDOutlinedTextField — each with the matching ExposedDropdownMenuDefaults colors and the standard expand/collapse trailing icon. enabled and supportingText are forwarded, and state set to State.ERROR switches the field into Material's error styling.

Selection: the anchor displays the SelectOption.label of the option whose SelectOption.id equals selectedOptionId. Tapping an item dispatches a local DropdownListTileEvents.OnItemSelected, and the holder stores the new selectedOptionId and closes the menu — no round trip to the server. Toggling the anchor dispatches OnDropdownListToggle (holder flips expanded) and dismissing dispatches OnDropdownListDismissRequest (holder closes).

Triggers dispatched:

  • OnDropdownListOpenEventTrigger — when the anchor is tapped while closed.

  • OnDropdownListCloseEventTrigger — whenever the menu closes: when the anchor is tapped while open, when the menu is dismissed by tapping outside, and right after an item is picked.

  • OnDropdownListItemSelectedEventTrigger — when an item is picked, right before the close trigger above. The trigger carries the selected SelectOption.id, so events can be wired per option.

Value production: the holder exposes the current selectedOptionId under a caller-chosen key, so GetData / EvaluateData events can read this dropdown by its id.

Notes: when selectedOptionId matches none of the options the anchor renders empty; the menu itself still lists every option, so the user can recover by picking one.

Constructors

Link copied to clipboard
constructor(id: String, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, visibility: TileSchema.Visibility, expanded: Boolean, options: SerializableImmutableList<DropdownListTileSchema.SelectOption>, selectedOptionId: String, enabled: Boolean, kind: DropdownListTileSchema.Kind, supportingText: String?, state: DropdownListTileSchema.State)

Types

Link copied to clipboard
Link copied to clipboard
@Serializable
data class SelectOption(val id: String, val label: String)
Link copied to clipboard

Properties

Link copied to clipboard
@SerialName(value = "enabled")
val enabled: Boolean
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?
Link copied to clipboard
@SerialName(value = "expanded")
val expanded: Boolean
Link copied to clipboard
@SerialName(value = "id")
open override val id: String
Link copied to clipboard
@SerialName(value = "kind")
val kind: DropdownListTileSchema.Kind
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "selectedOptionId")
val selectedOptionId: String
Link copied to clipboard
@SerialName(value = "state")
val state: DropdownListTileSchema.State
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "supportingText")
val supportingText: String?
Link copied to clipboard
@SerialName(value = "visibility")
open override val visibility: TileSchema.Visibility

Functions

Link copied to clipboard
open fun isGone(): Boolean
Link copied to clipboard
open fun isVisible(): Boolean