Open framitdavid opened 3 weeks ago
I have confirmed with team apps that we should allow the same layout set to be reused in multiple sub-form components. So no restrictions on that.
This issue is blocked until https://github.com/Altinn/altinn-studio/issues/13477 is merged.
I have two questions:
layout-sets.json
file is subform
with lowercase f
and not uppercase F
as in the componentType object 🙈
Background The SubForm component implemented in the following issue includes more configuration options than are currently supported in Studio. To fully utilize the SubForm component, we need to extend Studio to support all necessary configurations. That is what this issue is all about.
Requirements:
layoutSet
property with layout sets that are specifically designed to function as sub-forms. To identify supported layoutSet we need to determine which layout sets can be used as sub-forms, we need to read a property inlayout-sets.json
. The name of this property is"type": "subform"
SubForm Component configuration looks like the following:
In this example, the component points to the moped-subform layoutset. In addition, it points to a dataType - that is the default data type for the layoutset?
Details on
tableColumns
ConfigurationheaderContent: This defines a static title for the entire sub-form. The value should reference a text resource, serving as a label for the section.
cellContent: This specifies the content displayed for each row in the table. The value is a reference to a field in the data model. For instance, in the example provided, it points to "RegNo" and "Merke." The syntax follows dot notation, meaning the fields mentioned in the example are located at the root level of the data model. If the field is nested within an object, the configuration could look like
query: Person.firstName
, wherefirstName
is a field within thePerson
object.Based on the information above, we need a UI that allows users to select fields from the data model to use as query in cellContent. Content design is necessary to clearly communicate the purpose and of these configurations to ensure a great user experience.
Note In general, we should figure out a pattern to easily adopt new configurations as Team Apps come with new features that require new configurations.
Acceptance criteria
SubForm
component at a relevant sub-form layoutset.SubForm
component to a sub-form layoutset that is already used elsewhere.tableColumns
property