TextFieldTileSchema

@Serializable
@SerialName(value = "TextField")
data class TextFieldTileSchema(val id: String, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val visibility: TileSchema.Visibility, val value: String, val enabled: Boolean, val leadingIcon: IconSchema?, val clickableLeadingIcon: Boolean, val trailingIcon: IconSchema?, val clickableTrailingIcon: Boolean, val prefixText: String?, val suffixText: String?, val placeholder: String?, val label: String?, val supportingText: String?, val minLines: Int, val maxLines: Int, val kind: TextFieldTileSchema.Kind, val state: TextFieldTileSchema.State, val keyboardOptions: TextFieldTileSchema.KeyboardOptions?, val visualTransformation: TextFieldTileSchema.VisualTransformation?) : TileSchema

Renders a Material 3 text input field: Kind.FILLEDTextField, Kind.OUTLINEDOutlinedTextField. label, prefixText, suffixText, supportingText and placeholder are rendered only when non-null, enabled, minLines and maxLines are forwarded, and state set to State.ERROR switches the field into Material's error styling.

Text state: the renderer keeps a local TextFieldValue seeded from value. A LaunchedEffect on value re-syncs that local state whenever the server pushes a new value (e.g. via UpdateTiles), placing the caret at the end of the new text. On each keystroke the renderer dispatches a local TextFieldTileEvents.OnTextChange that the holder applies to its own state, so the typed text survives without a round trip to the server.

Icons: leadingIcon / trailingIcon render as plain icons by default. Setting clickableLeadingIcon / clickableTrailingIcon wraps them in an IconButton that fires its own trigger.

Keyboard: keyboardOptions maps to Compose KeyboardOptions (capitalization, keyboard type, IME action, autocorrect, show-on-focus) and visualTransformation to the field's visual transformation — VisualTransformation.None, VisualTransformation.Password (dots) or VisualTransformation.Custom with a VisualTransformation.Custom.mask.

Triggers dispatched:

  • OnTextChangedEventTrigger — on every keystroke where the text actually differs from value; the new text is passed as the event's incoming data.

  • OnKeyboardDoneEventTrigger, OnKeyboardGoEventTrigger, OnKeyboardNextEventTrigger, OnKeyboardPreviousEventTrigger, OnKeyboardSearchEventTrigger, OnKeyboardSendEventTrigger — when the matching IME action is pressed (the action shown depends on keyboardOptions.imeAction).

  • OnLeadingIconClickEventTrigger — only when clickableLeadingIcon is true.

  • OnTrailingIconClickEventTrigger — only when clickableTrailingIcon is true.

Value production: the holder exposes the current value under a caller-chosen key so GetData / EvaluateData events can read this field by its id. An empty value produces no entry at all rather than an empty string.

Constructors

Link copied to clipboard
constructor(id: String, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, visibility: TileSchema.Visibility, value: String, enabled: Boolean, leadingIcon: IconSchema?, clickableLeadingIcon: Boolean, trailingIcon: IconSchema?, clickableTrailingIcon: Boolean, prefixText: String?, suffixText: String?, placeholder: String?, label: String?, supportingText: String?, minLines: Int, maxLines: Int, kind: TextFieldTileSchema.Kind, state: TextFieldTileSchema.State, keyboardOptions: TextFieldTileSchema.KeyboardOptions?, visualTransformation: TextFieldTileSchema.VisualTransformation?)

Types

Link copied to clipboard
@Serializable
data class KeyboardOptions(val autoCorrectEnabled: Boolean?, val showKeyboardOnFocus: Boolean?, val capitalization: TextFieldTileSchema.KeyboardOptions.KeyboardCapitalization, val keyboardType: TextFieldTileSchema.KeyboardOptions.KeyboardType, val imeAction: TextFieldTileSchema.KeyboardOptions.ImeAction)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
sealed interface VisualTransformation

Properties

Link copied to clipboard
@SerialName(value = "clickableLeadingIcon")
val clickableLeadingIcon: Boolean
Link copied to clipboard
@SerialName(value = "clickableTrailingIcon")
val clickableTrailingIcon: Boolean
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 = "id")
open override val id: String
Link copied to clipboard
@SerialName(value = "keyboardOptions")
val keyboardOptions: TextFieldTileSchema.KeyboardOptions?
Link copied to clipboard
@SerialName(value = "kind")
val kind: TextFieldTileSchema.Kind
Link copied to clipboard
@SerialName(value = "label")
val label: String?
Link copied to clipboard
@SerialName(value = "leadingIcon")
val leadingIcon: IconSchema?
Link copied to clipboard
@SerialName(value = "maxLines")
val maxLines: Int
Link copied to clipboard
@SerialName(value = "minLines")
val minLines: Int
Link copied to clipboard
@SerialName(value = "placeholder")
val placeholder: String?
Link copied to clipboard
@SerialName(value = "prefixText")
val prefixText: String?
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "state")
val state: TextFieldTileSchema.State
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "suffixText")
val suffixText: String?
Link copied to clipboard
@SerialName(value = "supportingText")
val supportingText: String?
Link copied to clipboard
@SerialName(value = "trailingIcon")
val trailingIcon: IconSchema?
Link copied to clipboard
@SerialName(value = "value")
val value: String
Link copied to clipboard
@SerialName(value = "visibility")
open override val visibility: TileSchema.Visibility
Link copied to clipboard
@SerialName(value = "visualTransformation")
val visualTransformation: TextFieldTileSchema.VisualTransformation?

Functions

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