Skip to content

Extend component function to work with all data model bindings #4297

Description

@TomasEng

Currently, the component function in our expression language works with components that have simpleBinding only. Now that we have list and object support, we should extend it to work with all kinds of bindings.

Proposed solution

For group bindings

Non-repeating groups: Return an object with the ID's of the sub components as keys. The value of each key should be whatever component would return for that component.
Repeating groups: Return a list of objects, each of which is built the same way as for non-repeating groups.

We still need to decide what should happen with hidden components. Here are the alternatives:

  • Hide the ID's completely from the returning objects
  • Return null for the hidden values
  • Reveal the structure of all lists and objects (inlcuding nested ones), but with null for each hidden,value with a primitve type (for better type safety)

For other bindings

If the component is hidden, return null. Otherwise, return an object with the binding names as keys and whatever dataModel would return for that key as values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/logicrelated to logic/dynamics/expressionskind/product-featurePull requests containing new featuressquad/dataIssues that belongs to the named squad.

    Fields

    No fields configured for Enhancement.

    Projects

    Status
    No status
    Status
    📈 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions