UpdateTiles

fun EventSchemaBuilderScope.UpdateTiles(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, updates: UpdateTilesUpdateBuilderScope.() -> Unit)

Patches tiles in place — the primary way to change what is on screen without refetching it. Each updates entry (built with update) targets a tile by id and merges a map of field names into it: only the listed fields change, and style is merged rather than replaced. The map comes from incomingTileUpdateData (incomingData used as-is when it is a map; skipped and counted as a failure otherwise), inlineTileUpdateData (a literal map declared on the event), or mappedIncomingTileUpdateData (one template per field, each resolved against incomingData through the client's TemplateProcessor, so a payload can be reshaped per field on the way in). All updates are attempted even if one fails. Consumes incomingData for the incoming and mapped forms. Dispatches onSuccess (no data) when every update was applied; onFailure (no data, each failure logged), once at the end, when at least one update failed — no tile carries that id, a mapped template threw, or an incoming update got non-map incomingData.

Parameters

id

Unique identifier of this event. Defaults to a random id.

trigger

Trigger that fires this event, built via EventTriggers.

events

Child events chained after this one, wired to its triggers (onSuccess, onFailure).

updates

Tile patches, declared with update.