object-repeat
Version Compatibility
object-repeat
was introduced in version 4.21.0 of the JourneyApps Container.
Alpha Feature
object-repeat
is currently in alpha status. There are some known issues:
Performance is slow, especially when used with OnlineDB.
Nesting
object-repeat
inside anotherobject-repeat
does not work as expected.It is not possible to use an advanced
query
inside a nestedobject-table
orobject-list
(e.g. sorting, or anything other than a directhas-many
relationship on the object).
Issues that have been fixed:
The data inside the
object-repeat
does not always reload properly when changed (e.g. after a sync). This was fixed in version 4.27 of the JourneyApps Container.
Syntax
Attribute | Description |
---|---|
| The collection to loop over.
(The same as, e.g., |
| variable name to be used for the repeating object |
Scoping
object-repeat
creates a new “virtual scope” used for nested components. This specifically includes the current object, under the name specified in the as
attribute. This is relevant for:
Shorthand expressions.
Parameters passed to JS functions.
Nesting
Most components are allowed to be nested, with some specific exceptions:
columns/column
sidebar
Please note:
Nested
object-repeat
s are allowed, but do not currently function correctly.
More detailed example
Performance notes
Due to its complexity,
object-repeat
does not offer the same performance and speed thanobject-list
andobject-table
. Therefore, it is recommended to keep the number of objects in your collection < 20, and never more than around 50.object-repeat
is currently very slow when used withOnlineDB
- the user will see items loading one by one. As a workaround, always useobject-repeat
with anarray
and not aquery
when usingOnlineDB
.
Last updated