fix: skip Attribute fallback for custom-content datagrid columns#208
Merged
fix: skip Attribute fallback for custom-content datagrid columns#208
Conversation
PR #202 added a sugar that falls back to the column's name when no explicit Attribute is given. For custom-content columns (those with an action-button body and no attribute binding), this caused CE1613 "attribute no longer exists" because names like 'colActions' don't resolve to real attributes. Skip the sugar when the column has child widgets — those columns don't bind to an attribute. Fixes the 03-page-examples.mdl integration test regression.
AI Code ReviewCritical IssuesNone Moderate IssuesNone Minor IssuesNone What Looks Good
RecommendationApprove the PR. The fix resolves the reported bug without adverse effects, and the author has completed appropriate validation steps. The pending CI integration test ( Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #202 added a sugar that falls back to the column's name when no explicit
Attribute:is given. That's nice forCOLUMN Sku (Caption: 'SKU'), but for custom-content columns (those with an action-button body and no attribute binding), it caused:Because names like
colActionsdon't resolve to real attributes.Fix
Skip the sugar when the column has child widgets — those columns don't bind to an attribute.
Test plan
go build ./...go test ./mdl/executor/(unit tests pass)03-page-examples.mdlshould pass (the remaining main build failure)Cases covered:
COLUMN Sku (Caption: 'SKU')— no attr, no children → falls back to "Sku" ✓ (unchanged)COLUMN colActions (Caption: 'Actions') { ACTIONBUTTON ... }— no attr, has children → stays empty ✓ (fixed)COLUMN colActions (Attribute: Name, ..., ShowContentAs: customContent) { ... }— explicit attr → unchanged ✓