Skip to main content

Repeater

Repeater: instantiates a template component once per item of an input array, inserting the instances as children at its position.

The Repeater consumes an array on items and creates one instance of its template component per item, placed into the visual tree where the Repeater sits (it must therefore be a child of a visual container). With templateType explicit (the default) the template is one component chosen on the template input; with templateType dynamic, a templateScript chooses a component per item at runtime. Item data flows into each instance through the instance's Component Inputs whose names match the item object's property names. The repeater diffs changes to the array, adding/removing instances rather than rebuilding everything.

When to use it

Any repeated UI: lists, grids, menus, table rows. Its idiomatic partner is Query Records for cloud data or a Static Data/Variable2 array for local data. Not for repeating pure logic without visuals — see For Each Actions.

At a glance

CategoryVisual
Type nameFor Each
Available inbrowser
SSR compatibilitysafe
Provided bynoodl-viewer-react

Inputs

Values

NameTypeDefaultDescription
itemsArrayThe array or query result to repeat over; an empty value clears the list, including null and an empty array
templateComponentComponent to create once per item, with the item available to it as its Component Object
templateScriptString`// Set the 'component' variable to the name of the desired component for this item.
// Component name must start with a '/'.
// A component in a sheet is referred to by '/#Sheet Name/Comopnent Name'.
// The data for each item is available in a variable called 'item'
component = '/MyComponent';`JavaScript run per item that sets component to a component path; the item is available as item
templateTypeEnum (explicit, dynamic)explicitExplicit uses one component for every item; Dynamic picks one per item by running Script

Signals

NameTypeDefaultDescription
refreshSignalRebuilds every item from the current Items, discarding any state the item components held

Outputs

Values

NameTypeDefaultDescription
itemActionItemIdStringId of the item whose Repeater Item node last raised an action

Signals

NameTypeDefaultDescription
completedSignalFires after every invocation, whatever the outcome — wire this to carry on regardless. Failure still fires and still carries its reason, so this cannot hide an error
doneSignalFires once a Refresh has torn the list down and rebuilt it from the current Items, including when that leaves the list empty
itemsRenderedSignalFires once every item component exists and has been added; item creation is spread across frames, so this is the only honest moment to measure or scroll the list

Failure outputs

NameTypeDefaultDescription
failureSignalFires when the Repeater could not rebuild: no Items bound, no Template set, or nothing to render into

Dynamic ports

This node's port list changes at runtime (declared-port-groups, runtime-discovered); the tables above may be incomplete for a given instance.

The "Template Type"/template component determines dynamic input ports: inputs of the item template component are exposed so static values can be fed to each created item.

ConditionInputs shownOutputs shown
templateType = explicit OR templateType NOT SETtemplate
templateType = dynamictemplateScript

Ports at runtime

Two dynamic mechanisms: template/templateScript swap in and out based on templateType (declared-port-groups), and outputs named after signals sent by item components are registered on demand (runtime-discovered) — an item component's Component Outputs signal appears as an output port here so a list can bubble events up.

Patterns

  • Query Records items → Repeater items: the canonical data-driven list.
  • Item component declares Component Inputs matching record property names — no explicit per-field wiring at the list level.

Watch out for

  • Triggering refresh whenever data changes: the repeater already diffs items; refresh forces a full rebuild and loses instance state.
  • Binding huge unpaged query results into a repeater; page or limit the query instead.

Examples

List page: Repeater fed by Query Records

The canonical data-list shape. Query Records (DbCollection2) fetches a database class and exposes the result on its items array output; the Repeater (For Each) consumes that array and instantiates its template component once per record. Each record's properties are delivered to the item component through Component Inputs whose names match the record's property names — the item component reads them like any other input. The Repeater and its item template component are separate components by design.

Query Records, Component Inputs, Component Outputs, Repeater Item, Static Array

Generated

This page is generated from node-catalog-enriched.json. Do not edit it by hand — run npm run docs:nodes to regenerate, and fix the source enrichment instead.