SelectFieldComponent

open class SelectFieldComponent<T>(items: List<T>, store: Store<T>?) : Component<Unit> , InputFormProperties, SeverityProperties

This class offers configuration for a selectField element:

  • element size

  • placeholder text

  • icon

  • predefined styling variants

  • the text which is shown -> label

  • disabling the element

The functional expression `build`, which is the last parameter of the factory function, offers an initialized instance of this SelectFieldComponent class as receiver, so every mutating method can be called for configuring the desired state for rendering the selectField.

For a detailed explanation and examples of usage, have a look at the selectField function itself.

Constructors

SelectFieldComponent
Link copied to clipboard
js
fun <T> SelectFieldComponent(items: List<T>, store: Store<T>? = null)

Types

Companion
Link copied to clipboard
js
object Companion
EventsContext
Link copied to clipboard
js
class EventsContext<T>(selected: Flow<T>)

Functions

enabled
Link copied to clipboard
js
open override fun enabled(value: Boolean)
open override fun enabled(value: Flow<Boolean>)
equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
render
Link copied to clipboard
js
open override fun render(context: RenderContext, styling: BoxParams.() -> Unit, baseClass: StyleClass, id: String?, prefix: String)
Central method that should do the actual rendering of a component.
severity
Link copied to clipboard
js
open override fun severity(value: SeverityProperties.SeverityContext.() -> Severity)
Property to manage the severity value of the component.
severityClassOf
Link copied to clipboard
js
open override fun severityClassOf(severityStyle: SeverityStyles): Flow<StyleClass>
This function manages the task to map a value of the Severity enumeration to a corresponding style defined within the SeverityStyles interface.
toString
Link copied to clipboard
js
open fun toString(): String

Properties

basicSelectStyles
Link copied to clipboard
js
val basicSelectStyles: Style<BasicParams>
disabled
Link copied to clipboard
js
open override val disabled: DynamicComponentProperty<Boolean>
events
Link copied to clipboard
js
val events: ComponentProperty<SelectFieldComponent.EventsContext<T>.() -> Unit>
icon
Link copied to clipboard
js
val icon: ComponentProperty<Icons.() -> IconDefinition>
iconStyle
Link copied to clipboard
js
val iconStyle: Style<BasicParams>
iconWrapperStyle
Link copied to clipboard
js
val iconWrapperStyle: Style<BasicParams>
label
Link copied to clipboard
js
val label: ComponentProperty<(T) -> String>
placeholder
Link copied to clipboard
js
val placeholder: ComponentProperty<String>
readonly
Link copied to clipboard
js
open override val readonly: DynamicComponentProperty<Boolean>
selectedItem
Link copied to clipboard
js
val selectedItem: NullableDynamicComponentProperty<T>
severity
Link copied to clipboard
js
open override val severity: NullableDynamicComponentProperty<Severity?>
size
Link copied to clipboard
js
val size: ComponentProperty<FormSizes.() -> Style<BasicParams>>
variant
Link copied to clipboard
js
val variant: ComponentProperty<SelectFieldVariants.() -> Style<BasicParams>>