{{/* Components */ -}}
{{- if .fields.components -}}
{{- range .fields.components -}}
{{- cell .name -}}
{{end}}
{{- else -}}
{{- cell "<none>" -}}
{{- end -}}
But when there is more than one component, the table breaks. If the table should have 5 columns, the ticket with more than one component has a row with 5 + C - 1 rows; where C is the number of components.
Ideally, I'd want the multiple components to be joined in the same cell block. Any ideas on this?
The closest I've come to trying to get this working is
Is it possible to have a
range
in acell
?I have something like this
But when there is more than one component, the table breaks. If the table should have 5 columns, the ticket with more than one component has a row with
5 + C - 1
rows; whereC
is the number of components.Ideally, I'd want the multiple components to be joined in the same cell block. Any ideas on this?
The closest I've come to trying to get this working is
But this throws an error since
join
expects an array and is getting a more complex object. — and there's nomap
to reduce the object into an array