DropdownFieldController

This class controls the dropdown view and implements the InputController interface. Because it can never be in error the errorMessage is always null. It is also designed to always have a value selected, so isComplete is always true.

Constructors

Link copied to clipboard
constructor(config: DropdownConfig, initialValue: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
open override val error: StateFlow<FieldError?>
Link copied to clipboard
open override val fieldValue: StateFlow<String>
Link copied to clipboard
open override val formFieldValue: StateFlow<FormFieldEntry>
Link copied to clipboard
open override val isComplete: StateFlow<Boolean>
Link copied to clipboard
open override val label: StateFlow<Int>
Link copied to clipboard
open override val rawFieldValue: StateFlow<String?>
Link copied to clipboard
val selectedIndex: StateFlow<Int>
Link copied to clipboard
open override val showOptionalLabel: Boolean = false
Link copied to clipboard

Functions

Link copied to clipboard
open override fun ComposeUI(enabled: Boolean, field: SectionFieldElement, modifier: Modifier, hiddenIdentifiers: Set<IdentifierSpec>, lastTextFieldIdentifier: IdentifierSpec?, nextFocusDirection: FocusDirection, previousFocusDirection: FocusDirection)
Link copied to clipboard

Get the label for the selected item, shown when the dropdown list is collapsed.

Link copied to clipboard
open override fun onRawValueChange(rawValue: String)

This is called when the value changed to is a raw backing value, not a display value.

Link copied to clipboard
fun onValueChange(index: Int)

This is called when the value changed to is a display value.