section
Learn how to use the section component in your user interface to group related items together.
Examples and code snippets
The Entity with sections, rows, and entity fields (Display only)

children:
- type: component.entity
options:
children:
- type: component.section
options:
title: Repair Services
children:
- type: component.field-row
options:
children:
- type: component.entity-field
options:
label: Service
value: [email protected][id=1].service
- type: component.field-row
options:
children:
- type: component.entity-field
options:
label: Description
value: [email protected][id=1].description
isMultiline: true
- type: component.section
options:
title: Rates
children:
- type: component.field-row
options:
children:
- type: component.entity-field
options:
label: Hourly Rate
value: [email protected][id=1].hourlyRate
- type: component.entity-field
options:
label: Time
value: [email protected][id=1].time & ' minutes'
- type: component.entity-field
options:
label: Materials
value: =(@ctx.datasources.repair-services-static[id=1].materials = 'True' ? true :false)
contentType: checkbox
Section-rows-entity-fields (dynamic)
children:
- type: component.entity
options:
children:
- type: component.section
options:
title: Cleaning Services
children:
- type: component.field-row
options:
children:
- type: component.entity-field
options:
label: Service
value: [email protected][0].service
- type: component.entity-field
options:
label: Area
value: [email protected][0].area
- type: component.field-row
options:
children:
- type: component.entity-field
options:
label: Time
value: [email protected][0].time & ' minutes'
- type: component.entity-field
options:
label: Indoor
value: [email protected][0].indoor
contentType: checkbox
- type: component.field-row
options:
children:
- type: component.entity-field
options:
label: Description
value: [email protected][0].description
isMultiline: true
- type: component.section
options:
title: Rates
children:
- type: component.field-row
options:
children:
- type: component.entity-field
options:
label: Hourly Rate
value: [email protected][0].hourlyrate != null ? @ctx.datasources.cleaning-services-dynamic[0].hourlyrate:'N/A'
- type: component.entity-field
options:
label: Once Off Rate
value: [email protected][0].onceoffrate != null ? @ctx.datasources.cleaning-services-dynamic[0].onceoffrate:'N/A'Form with sections, rows, and children components (Display and input)

Entity with sections and entity-fields (Display only)

Form with sections and entity-fields (Display and input)

Last updated
Was this helpful?