LazyRowTileSchema

@Serializable
@SerialName(value = "LazyRow")
data class LazyRowTileSchema(val id: String, val tiles: SerializableImmutableList<TileSchema>, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val filterChildrenByTerm: String?, val visibility: TileSchema.Visibility, val arrangement: ArrangementSchema.Horizontal, val alignment: AlignmentSchema.Vertical, val scrollThreshold: Int? = null, val considerLoadingItemAtEndOnThresholdReached: Boolean = true, val displayScrollbar: Boolean = false) : TileSchema

Renders a Compose LazyRow over tiles — one lazy item per child, keyed by the child's id — spaced by arrangement and aligned vertically by alignment. Only visible children are composed, which makes this the tile to use for long or paginated horizontal lists.

Child scope: each item publishes its LazyItemScope as a CompositionLocal (and clears the row and flow-row scopes), so children can use lazy-item modifiers such as animateItem and fillParentMaxSize — but not RowScope.weight.

Pagination: when scrollThreshold is set, the tile fires its threshold trigger as soon as fewer than or exactly scrollThreshold items remain past the last visible one. It fires at most once per item count, so it will not fire again until the list actually grows — considerLoadingItemAtEndOnThresholdReached (default true) additionally requires the list to have grown by more than one item, which accounts for a loading placeholder appended at the end while the next page is in flight.

Scroll control: the tile listens to the screen broadcast channel and reacts to scroll-to-start, scroll-to-end and scroll-to-item commands addressed to its id, each optionally animated. The scroll-to variant takes a child index.

Filtering: when filterChildrenByTerm is non-null and non-empty, only children whose searchableTerms contain that term (case-insensitive, substring match) are rendered. Children without searchableTerms are filtered out.

Triggers dispatched:

  • OnDisplayEventTrigger — fired once when the tile enters composition (keyed by tile id).

  • OnClickEventTrigger — fired when the list itself is tapped, but only if an OnClick event is declared on this tile.

  • OnScrolledEventTrigger — fired when the scroll direction changes, carrying ScrollDirection.End when scrolling forward and ScrollDirection.Start when scrolling backward.

  • OnScrollThresholdReachedEventTrigger — fired as described above; never fired when scrollThreshold is null.

Scrollbar: when displayScrollbar is true the tile draws a horizontal scrollbar along its bottom edge. It defaults to false and is honoured on every platform — enable it where a pointer-driven scrollbar makes sense, typically desktop and web.

Constructors

Link copied to clipboard
constructor(id: String, tiles: SerializableImmutableList<TileSchema>, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, filterChildrenByTerm: String?, visibility: TileSchema.Visibility, arrangement: ArrangementSchema.Horizontal, alignment: AlignmentSchema.Vertical, scrollThreshold: Int? = null, considerLoadingItemAtEndOnThresholdReached: Boolean = true, displayScrollbar: Boolean = false)

Properties

Link copied to clipboard
@SerialName(value = "alignment")
val alignment: AlignmentSchema.Vertical
Link copied to clipboard
@SerialName(value = "arrangement")
val arrangement: ArrangementSchema.Horizontal
@SerialName(value = "considerLoadingItemAtEndOnThresholdReached")
val considerLoadingItemAtEndOnThresholdReached: Boolean
Link copied to clipboard
@SerialName(value = "displayScrollbar")
val displayScrollbar: Boolean
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?
Link copied to clipboard
@SerialName(value = "filterChildrenByTerm")
val filterChildrenByTerm: String?
Link copied to clipboard
@SerialName(value = "id")
open override val id: String
Link copied to clipboard
@SerialName(value = "scrollThreshold")
val scrollThreshold: Int?
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "tiles")
val tiles: SerializableImmutableList<TileSchema>
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