Skip to content

Commit 02c09cd

Browse files
authored
Merge pull request #208 from mendixlabs/fix/column-actions-customcontent
fix: skip Attribute fallback for custom-content datagrid columns
2 parents 52f41dc + 6bdea65 commit 02c09cd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

mdl/executor/cmd_pages_builder_v3_widgets.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,9 @@ func (pb *pageBuilder) buildDataGridV3(w *ast.WidgetV3) (*pages.CustomWidget, er
128128
attr := child.GetAttribute()
129129
// Sugar: when no explicit Attribute: property is given, fall back to
130130
// the column's name. This lets `COLUMN Sku (Caption: 'SKU')` work
131-
// without repeating `Attribute: Sku`. If the name starts with a
132-
// lowercase prefix like "col" (convention for decoration), it won't
133-
// resolve to a real attribute — and mx check will flag it later.
134-
if attr == "" && child.Name != "" {
131+
// without repeating `Attribute: Sku`. Skip for custom-content columns
132+
// (those with a body of child widgets), which don't bind to an attribute.
133+
if attr == "" && child.Name != "" && len(child.Children) == 0 {
135134
attr = child.Name
136135
}
137136
col := ast.DataGridColumnDef{

0 commit comments

Comments
 (0)