LearnNewsExamplesServices
Frontmatter
id9830
titleSynchronize Multi-Body Selection State in GridContainer
stateOpen
labels
bugaigrid
assigneestobiu
createdAtApr 9, 2026, 7:06 PM
updatedAtApr 9, 2026, 7:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/9830
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

Synchronize Multi-Body Selection State in GridContainer

Openbugaigrid
tobiu
tobiu commented on Apr 9, 2026, 7:06 PM

Context

During the testing of the Grid Multi-Body architecture via Neural Link E2E capabilities, we discovered a core architectural synchronization failure in Neo.selection.grid.RowModel.

In a standard single-body Grid layout, the Selection Model successfully listens to DOM events such as rowClick bindings via me.view.parent.on('rowClick', me.onRowClick, me), where me.view.parent typically represents the overarching orchestrator.

The Problem

When the grid splits into multiple bodies (bodyStart, bodyCenter, bodyEnd), and we instantiate them using Neo.grid.View wrappers:

  1. GridBody.parent explicitly resolves to Neo.grid.View (configured by parentId: me.view.id).
  2. When a row is clicked inside body, the internal event fires me.gridContainer.fire(eventName, ...) directly natively targeting the Container.
  3. However, RowModel does not listen to gridContainer. It stays rigidly bound to its parent wrapper (Neo.grid.View).
  4. The GridView wrapper component does not natively trap or bubble the rowClick event.

Because of this paradigm disconnect, the RowModel across sub-grids fails to detect row clicks, leaving the selection state (selectedRows) out of sync preventing rows from highlighting globally.

Proposed Architecture Fix

  1. Refactor Neo.selection.grid.RowModel to bind to me.view.gridContainer || me.view.parent so it natively captures the bubbling rowClick fired directly by GridBody.
  2. Evaluate if state arrays such as selectedRows should be delegated upward to the GridContainer levels so all 3 instantiated RowModels reflect single state truth.
tobiu added the bug label on Apr 9, 2026, 7:06 PM
tobiu added the ai label on Apr 9, 2026, 7:06 PM
tobiu added the grid label on Apr 9, 2026, 7:06 PM
tobiu assigned to @tobiu on Apr 9, 2026, 7:06 PM
tobiu referenced in commit 74a5abc - "test: Sync E2E logic to Neural Link selection API #9830" on Apr 9, 2026, 7:06 PM