Skip to content

fix(table): load the values list of columns under a grouped header - #125

Merged
sdcorejs merged 1 commit into
mainfrom
claude/sd-table-grouped-values-load
Oct 30, 2026
Merged

sdcorejs merged 1 commit into
mainfrom
claude/sd-table-grouped-values-load

Conversation

@sdcorejs

Copy link
Copy Markdown
Owner

What

sd-table loaded the lists of values columns for top-level columns only. A values column under a grouped header (type: 'children') never got its list:

  • its cells showed the raw codes (new) instead of the display text (Chờ xác nhận), whatever the kind of items (array, signal, function), and so did the export;
  • with items as a function, the function was never called, so the column filter offered nothing.

The configuration hydration now passes leaf columns (leafColumns()) to SdTableFormatService.loadValues, still limited to the displayed columns — a one-line change in table.component.ts.

Found by the independent review of #124 (out of that PR's scope); same root cause as the grouped-header filter fix in #124.

API consistency

No public API change: no input, output, option, autoId or export added, renamed or removed. leafColumns() is the internal helper already used by the filter pipeline. v19 → v20/v21/v22 through npm run sync; check:sync green.

Verification

  • New spec table.component.grouped-values.spec.ts (written first, 3 red before the fix): display text for array / function / signal items under a grouped header, the function called once, the column filter list filled.
  • ng test sdcorejs-angular --code-coverage: 8672/8672 (Statements 87.49%, Branches 78.4%, Functions 86.5%, Lines 89.93%).
  • npm run lint, npm run test:theme (53/53), npm run check:scss-hex (0), npm run check:sync, test:showcase-changelog.
  • Docs: sd-table.md (grouped headers), CHANGELOG [Unreleased] › Fixed › Table.

Independent review: not done for this one-line fix.

🤖 Generated with Claude Code

The table loaded `values` lookups for top-level columns only. A `values`
column under a grouped header (`type: 'children'`) never got its list:
its cells (and the export) showed the raw codes instead of the display
text, whatever the kind of `items` (array, signal, function), and with
`items` as a function the function was never called, so the column
filter offered nothing.

The configuration hydration now passes leaf columns (`leafColumns()`) to
`loadValues`, still limited to the displayed columns.

Spec, written first and seen failing (3 red): table.component
.grouped-values.spec.ts — display text for array / function / signal
items, the function called once, the column filter list filled.

Docs: sd-table.md (grouped headers), CHANGELOG [Unreleased] Fixed › Table.

Rolled out from v19 with npm run sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdcorejs
sdcorejs merged commit 8c76edd into main Oct 30, 2026
7 checks passed
@sdcorejs
sdcorejs deleted the claude/sd-table-grouped-values-load branch October 30, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants