LearnNewsExamplesServices
Frontmatter
id8978
titleRefactor Selection Models: Phase 1 (Base & Row)
stateClosed
labels
enhancementairefactoring
assigneestobiu
createdAtFeb 4, 2026, 10:50 AM
updatedAtFeb 4, 2026, 11:23 AM
githubUrlhttps://github.com/neomjs/neo/issues/8978
authortobiu
commentsCount1
parentIssue8964
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 4, 2026, 11:23 AM

Refactor Selection Models: Phase 1 (Base & Row)

Closed v12.0.0 enhancementairefactoring
tobiu
tobiu commented on Feb 4, 2026, 10:50 AM

The Neo.grid.Row refactor changes how rows are rendered. BaseModel and RowModel currently manipulate VDOM directly, which is obsolete.

Scope:

  1. Refactor BaseModel:
    • Modify selectRow, deselectRow, and deselectAllRows.
    • Remove legacy VDOM manipulation (e.g., view.getVdomChild, node.cls).
    • Instead, update the local selectedRows state and then find the corresponding mounted Neo.grid.Row component(s) in view.items.
    • Trigger an update on the found Row component(s) (e.g., call row.createVdom() or force an update) to reflect the new selection state.
  2. Verify RowModel:
    • Ensure onRowClick and onNavKeyRow work with the new component-based rows.
    • Verify getRecord(path) logic remains valid with the new VDOM structure (checking aria-rowindex).

Note: This is the first sub-task of the Selection Model refactor. Cell/Column models will be handled separately.

tobiu added the enhancement label on Feb 4, 2026, 10:50 AM
tobiu added the ai label on Feb 4, 2026, 10:50 AM
tobiu added the refactoring label on Feb 4, 2026, 10:50 AM
tobiu referenced in commit 9fc33c5 - "refactor: Update selection logic for component-based rows (#8978)" on Feb 4, 2026, 11:21 AM
tobiu added parent issue #8964 on Feb 4, 2026, 11:21 AM
tobiu
tobiu Feb 4, 2026, 11:21 AM

Input from Gemini 3 Pro:

✦ Refactored BaseModel to support component-based rows.

  • Removed legacy VDOM manipulation (view.getVdomChild).
  • Implemented getRowComponent helper.
  • Optimized updates: Now modifies row.vdom directly (class/aria) and triggers a scoped view.update() with updateDepth: 2 instead of full Row re-renders.
  • Verified click-based selection works.
  • Note: Keyboard navigation is currently broken and will need a separate fix (out of scope for this ticket).
tobiu assigned to @tobiu on Feb 4, 2026, 11:23 AM
tobiu closed this issue on Feb 4, 2026, 11:23 AM