Skip to content

Refactor Grid.Body to extend Component.Base and use internal Row Pool #9017

@tobiu

Description

@tobiu

Objective:
Revert Neo.grid.Body inheritance from Neo.container.Base to Neo.component.Base. The new "Fixed-DOM-Order" Row Pooling strategy renders the Container API (add, remove, layout) unsafe and redundant.

Changes Required:

  1. Inheritance:

    • Change src/grid/Body.mjs to extend Neo.component.Base.
  2. Row Pool Management:

    • Replace the items config with a private/protected class field (e.g., items = []) to store Neo.grid.Row instances.
    • Update createRowPool to instantiate rows with:
      parentId: me.id,
      appName : me.appName,
      windowId: me.windowId,
      theme   : me.theme
  3. Lifecycle Management:

    • Implement destroy() to manually iterate and destroy row instances in this.items.
  4. Config Propagation (Container Behavior Mimicry):

    • Implement afterSetAppName, afterSetMounted, afterSetTheme, and afterSetWindowId.
    • These methods must iterate over this.items and update the corresponding properties on the row instances, ensuring correct state propagation (theme changes, window moves, etc.).
  5. Verification:

    • Ensure Neo.manager.Component methods (down, query) still function correctly by relying on the parentId link.

Why:
To enforce API safety by hiding inapplicable container methods and to remove the overhead of unused layout/container logic in the highly performance-sensitive grid body.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions