Context
A grid column class that lives outside the engine, in an app or in a package that extends the grid, cannot be named in a grid's columns config. Neo.grid.Container#createColumns() picks every column's class from the static columnTypes map by type (src/grid/Container.mjs:1010). That map lists only the engine's own columns (:43).
The one way in today is a Container subclass that redeclares the map:
static columnTypes = {...GridContainer.columnTypes, myType: MyColumn}No app or example does this: grep -rn columnTypes apps examples src hits src/grid/Container.mjs only. So a column shipped by a package can't be used in a consumer's existing grids without subclassing each of them.
Observed while building a tree-column subclass in a separate package. The column works, but only inside a dedicated Container subclass that registers its type.
The Problem
Everywhere else in Neo, a config names its class with module:
- container items (
src/container/Base.mjs:398);
ClassSystemUtil.beforeSetInstance();
- the grid's own
body: {module: MyBody}.
Columns are the exception, so the engine's built-in columns are the only ones a config can reach.
The Architectural Reality
createColumns() (src/grid/Container.mjs:952) builds two things from each column config:
- The header button.
buttonConfig = {...column, columnMenu: …} (:993) loses only id (:996) and becomes an item of the header toolbar. The toolbar's itemDefaults is {ntype: 'grid-header-button'} (src/grid/header/Toolbar.mjs:37).
- The column.
columnClass = me.constructor.columnTypes[column.type || 'column'] (:1010), then Neo.create(columnClass, {parent, windowId, ...column}) (:1013).
The trap. In container item creation, an item's module deletes the ntype default (src/container/Base.mjs:396-400). So a module copied into buttonConfig would build the column class as a header button.
The Fix
In createColumns():
- A column config's
module, a class extending Neo.grid.column.Base, takes precedence over type: columnClass = column.module || columnTypes[column.type || 'column'].
module never reaches the header button. Delete it from buttonConfig beside id, and from the column config once it is consumed, as type already is.
- The JSDoc of
columns_ and columnTypes names both ways to choose a column class.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
Neo.grid.Container#columns_ column configs |
createColumns(), src/grid/Container.mjs:952 |
A config may carry module: <column class>, which wins over type |
No module: today's type lookup, default 'column' |
JSDoc of columns_ and columnTypes |
New unit spec |
Decision Record impact: none.
Acceptance Criteria
Out of Scope
- A global registration API such as
Container.registerColumnType(). Mutating a shared static map on import changes every grid in the app; module stays local to the config that names it.
Neo.table.Container. It has no columnTypes map.
- Replacing the header button's class.
Avoided Traps
- Spreading
module into buttonConfig. It builds the column class as a header button (see the trap above).
- The status quo, a
Container subclass per grid that uses an extension column.
Related
#9035, #9009: engine columns were registered by editing the map in src/grid/Container.mjs.
Live latest-open + closed sweep: checked latest 20 open + closed search (columnTypes, custom column, column type) at 2026-11-03T17:5xZ. Out of Scope / Avoided Traps were read on the same-surface hits #6525, #9009 and #9035; no equivalent or prior exclusion found. KB ticket sweep: no equivalent. A2A sweep, last 30 messages: no claim on this scope. Memory Core: no prior decision. Own assignments: none on this surface.
unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Origin Session ID: 9ae27458-df2a-4524-94e3-65fb2a075f3d
Retrieval Hint: "grid column config module class outside columnTypes"
Context
A grid column class that lives outside the engine, in an app or in a package that extends the grid, cannot be named in a grid's
columnsconfig.Neo.grid.Container#createColumns()picks every column's class from the staticcolumnTypesmap bytype(src/grid/Container.mjs:1010). That map lists only the engine's own columns (:43).The one way in today is a
Containersubclass that redeclares the map:static columnTypes = {...GridContainer.columnTypes, myType: MyColumn}No app or example does this:
grep -rn columnTypes apps examples srchitssrc/grid/Container.mjsonly. So a column shipped by a package can't be used in a consumer's existing grids without subclassing each of them.Observed while building a tree-column subclass in a separate package. The column works, but only inside a dedicated
Containersubclass that registers its type.The Problem
Everywhere else in Neo, a config names its class with
module:src/container/Base.mjs:398);ClassSystemUtil.beforeSetInstance();body: {module: MyBody}.Columns are the exception, so the engine's built-in columns are the only ones a config can reach.
The Architectural Reality
createColumns()(src/grid/Container.mjs:952) builds two things from each column config:buttonConfig = {...column, columnMenu: …}(:993) loses onlyid(:996) and becomes an item of the header toolbar. The toolbar'sitemDefaultsis{ntype: 'grid-header-button'}(src/grid/header/Toolbar.mjs:37).columnClass = me.constructor.columnTypes[column.type || 'column'](:1010), thenNeo.create(columnClass, {parent, windowId, ...column})(:1013).The trap. In container item creation, an item's
moduledeletes thentypedefault (src/container/Base.mjs:396-400). So amodulecopied intobuttonConfigwould build the column class as a header button.The Fix
In
createColumns():module, a class extendingNeo.grid.column.Base, takes precedence overtype:columnClass = column.module || columnTypes[column.type || 'column'].modulenever reaches the header button. Delete it frombuttonConfigbesideid, and from the column config once it is consumed, astypealready is.columns_andcolumnTypesnames both ways to choose a column class.Contract Ledger
Neo.grid.Container#columns_column configscreateColumns(),src/grid/Container.mjs:952module: <column class>, which wins overtypemodule: today'stypelookup, default'column'columns_andcolumnTypesDecision Record impact: none.
Acceptance Criteria
{module: MyColumn, dataField: 'x'}creates aMyColumn.MyColumnis defined in the spec, extendsNeo.grid.column.Baseand is absent fromcolumnTypes.Neo.grid.header.Button, not aMyColumn.module,typeresolves exactly as today, and the existing grid unit specs stay green.columnsagain keepsmodule-based columns working.test/playwright/unit/grid/covers these cases, run withnpx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/grid/.Out of Scope
Container.registerColumnType(). Mutating a shared static map on import changes every grid in the app;modulestays local to the config that names it.Neo.table.Container. It has nocolumnTypesmap.Avoided Traps
moduleintobuttonConfig. It builds the column class as a header button (see the trap above).Containersubclass per grid that uses an extension column.Related
#9035,#9009: engine columns were registered by editing the map insrc/grid/Container.mjs.Live latest-open + closed sweep: checked latest 20 open + closed search (
columnTypes, custom column, column type) at 2026-11-03T17:5xZ. Out of Scope / Avoided Traps were read on the same-surface hits#6525,#9009and#9035; no equivalent or prior exclusion found. KB ticket sweep: no equivalent. A2A sweep, last 30 messages: no claim on this scope. Memory Core: no prior decision. Own assignments: none on this surface.unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Origin Session ID: 9ae27458-df2a-4524-94e3-65fb2a075f3d
Retrieval Hint: "grid column config module class outside columnTypes"