Run 6: Item-grid Integration — Byproducts
API Extensions Added to entity-data-grid
Section titled “API Extensions Added to entity-data-grid”These additions were required to support item-grid’s use cases and benefit all entity grids going forward:
gridContext + gridContextOverride (DataGrid molecule + entity-data-grid)
Section titled “gridContext + gridContextOverride (DataGrid molecule + entity-data-grid)”- Why:
NotesCellRendererand other custom cell renderers may need to read runtime values fromparams.context - Implementation:
gridContextis static (factory-time) inEntityDataGridConfig;gridContextOverrideis runtime (per-render) inEntityDataGridViewProps. They’re shallow-merged: runtime values take precedence - DataGrid change: Added
gridContext?: Record<string, unknown>toDataGridRuntimeConfig; passed ascontext={gridContext}to AG Grid when set
getGridApi() on EntityDataGridRef
Section titled “getGridApi() on EntityDataGridRef”- Why: Callers need imperative access to the AG Grid API for operations like
setColumnsVisible,deselectAll,exportDataAsCsv - Implementation:
EntityDataGridRef.getGridApi()delegates toDataGridRef.getGridApi()which returnsGridApi<T> | null - Shim impact:
EntityDataGridShimRefextendsEntityDataGridRef, so the shim also neededgetGridApi()added to itsuseImperativeHandle
Behavioral Note: Count Label Format Change
Section titled “Behavioral Note: Count Label Format Change”The search-active count label changed from "1 item" (filtered total only) to "1 of 12 items" (filtered of total). This is a better UX that shows search context. The 3 affected tests and the WithSearch story play function were updated. No visual regressions expected — the label format is an improvement.
Known Limitations
Section titled “Known Limitations”height prop is silently ignored
Section titled “height prop is silently ignored”ItemGridStaticConfig.height (defaulted to 600 in the old implementation) is now accepted but not passed to entity-data-grid. The grid fills the parent container via flex layout. Callers that relied on the fixed height = 600 default should wrap the component in a sized container or use autoHeight. No current caller other than stories is known to depend on this.
enableRowSelection prop is silently ignored
Section titled “enableRowSelection prop is silently ignored”The old implementation gated rowSelection: { mode: 'multiRow', headerCheckbox: true } on this prop. In the new implementation, DataGrid always enables multi-row selection. The visual difference: all item-grid instances now show selection checkboxes. This is generally desirable but is a behavioral change for callers that passed enableRowSelection={false} expecting no checkboxes.
useMemo with string key for factory rebuild
Section titled “useMemo with string key for factory rebuild”The createEntityDataGrid factory is called inside useMemo with a string key (makeFactoryKey). This is a pragmatic workaround for the fact that React’s useMemo doesn’t support object dependency comparison. The factory only rebuilds when the key changes (lookup presence, pageSize, actionsColumn presence, autoHeight). The key approach works for the current use cases but could be simplified if the factory was always stable (e.g., if lookups changed identity without changing presence).
For Run 7 (Package API / Barrel Exports)
Section titled “For Run 7 (Package API / Barrel Exports)”Exports added in Run 6
Section titled “Exports added in Run 6”From organisms/item-grid/index.ts:
ItemGridHandle— new type export (was not in old index.ts)PendingChanges— re-exported from entity-data-grid (was fromuse-item-grid-editing)ItemGridEditingHandle— still exported (now fromitem-grid.tsxnotuse-item-grid-editing.ts)
From organisms/shared/entity-data-grid/index.ts (unchanged, but note):
EntityDataGridRefnow hasgetGridApi()— callers using this type may need to implement it
Exports removed in Run 6
Section titled “Exports removed in Run 6”From organisms/item-grid/index.ts:
RowEditState— was exported fromuse-item-grid-editing.ts, which is now deleted. It’s still available fromentity-data-grid/index.tsuseItemGridEditingwas never in the barrel (only inuse-item-grid-editing.tsfile-level)
canary.ts impact: The barrel (src/canary.ts) does not currently export from organisms/item-grid. Run 7 should decide whether to add item-grid exports to canary.ts.
Molecules/item-grid Cleanup
Section titled “Molecules/item-grid Cleanup”molecules/item-grid/select-cell-editor.tsx was deleted. The remaining files in molecules/item-grid/:
typeahead-cell-editor.tsx— still canonical for typeahead; no atom-level equivalent exists yetitem-grid-columns.tsx— domain column definitions; stays in moleculesitem-grid-fixtures.ts— test data; stays in moleculesdrag-header.tsx— drag grip header component; stays in moleculesitem-grid-molecules.stories.tsx— stories for the above
Run 7 may want to evaluate promoting typeahead-cell-editor.tsx to an atom (it was identified in the analysis as deserving atom-level status).
Copyright: © Arda Systems 2025-2026, All rights reserved