LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtOct 17, 2026, 9:30 PM
updatedAtOct 17, 2026, 11:04 PM
githubUrlhttps://github.com/neomjs/neo/issues/19839
authorneo-opus-grace
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 17, 2026, 11:02 PM

A grid column's renderer string resolves to its view controller's method

neo-opus-grace
neo-opus-grace commented on Oct 17, 2026, 9:30 PM

Context

On dev 44534e3128, examples/grid/nestedRecordFields renders its headers and no rows. Every row build throws TypeError: column.renderer.call is not a function at src/grid/Row.mjs applyRendererOutput, with the console reading vdom settlement failed neo-grid-body-1. A 13.2.0 worktree throws the same at Row.mjs:190, so the defect predates 13.3; it was found in an exploratory 13.3 pass (defect-note fingerprint 135c1e57c70fc633). The operator (2026-10-17): fix it now so it can ride 13.3; the renderer string should resolve to the controller method.

The Problem

The Country column declares renderer: 'countryRenderer' (examples/grid/nestedRecordFields/Viewport.mjs:69), and ViewportController#countryRenderer defines it (ViewportController.mjs:25). The name never reaches that method. A string renderer that only a view controller defines stays a string, and the first row that renders it throws.

The Architectural Reality

  • Neo.grid.column.Base#beforeSetRenderer resolves the name with resolveCallback(value, me). For a plain name, resolveCallback (src/util/Function.mjs) asks scope.getController?.() for a handler scope. A column is a core.Base, not a component, and has no getController, so only the column itself is searched. An up. name walks the column's parent chain.
  • Unresolved, it returns the plain string. The comment there says "for view controllers to match", but no controller pass ever replaces a column's renderer.
  • Neo.grid.Container#createColumns resolves a string renderer only against the grid Container itself (me[renderer]).
  • A component's string handler resolves through getController()?.getHandlerScope(name) (controller.Component#getHandlerScope). The grid Container is a component, and it is the column's parent.
  • The rendererScope JSDoc ranks the sources: an explicit scope, then the instance a string resolved against ('up.name' the ancestor, a plain name the column), then the grid Container. The #18771 fix (PR #18773) and test/playwright/unit/grid/column/RendererScope.spec.mjs pin that order.

The Fix

In beforeSetRenderer, a plain name that neither the column nor resolveCallback finds is looked up through the grid's view controllers: me.parent?.getController?.()?.getHandlerScope(name, null). The controller that defines the method becomes the rendererScope, so the method runs on it, as a component's string handler would. The column-first order stays: a name the column defines (the default cellRenderer, a subclass override) is never taken over by a controller method of the same name. The rendererScope JSDoc and the stale comment state the controller source.

Acceptance Criteria

  • AC-1: A column whose plain-name renderer only a view controller above the grid defines renders through that method, with the controller as this (unit, RendererScope.spec.mjs).
  • AC-2: A name the column itself defines still runs on the column when a controller defines the same name (unit control).
  • AC-3: The existing RendererScope.spec.mjs arms (up., function, cellCls, me/this, explicit scope, the cellRenderer controls) stay green.
  • AC-4: examples/grid/nestedRecordFields renders its rows, with the Country column showing countryRenderer's country names and no console error, in a real browser.

Evidence per AC: PR #19840's AC table, at the head the operator merged (e161f623bf, 2026-10-17); AC-1–AC-3 ran in hosted CI's unit job, and AC-4 is the headless-Chromium render on the dev server at that head.

Out of Scope

  • Table columns' header-button scope (#18797's area).
  • Clearer errors for a name nothing defines.
  • Other examples.

Related

#18771 / PR #18773 (renderer scope order) · #18797 · #19652 (the 13.3 cut; whether this rides it is the operator's merge)

Live latest-open sweep: latest 20 open issues at 2026-10-17T19:30:01Z; no equivalent. gh search "column renderer controller string": no open match A2A claim sweep: this lane follows my own defect-note; no claim on grid renderer resolution in the window MC sweep: "grid column string renderer view controller method not resolved renderer.call is not a function", 4 results, none relevant Own-assignment sweep: #19652, #19765, #19766 (13.3 cut), #15000; disjoint

Origin Session ID: caeb11ca-daae-42a2-8924-95229e329df2

Retrieval Hint: "grid column renderer string view controller getHandlerScope nestedRecordFields countryRenderer"

tobiu referenced in commit e161f62 - "fix(grid): a column's renderer string resolves to its view controller's method when the column does not define it (#19839) (#19840)" on Oct 17, 2026, 11:02 PM
tobiu closed this issue on Oct 17, 2026, 11:02 PM