-
-
Notifications
You must be signed in to change notification settings - Fork 202
Refactor Grid.Body to extend Component.Base and use internal Row Pool #9017
Copy link
Copy link
Closed
Labels
Description
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:
-
Inheritance:
- Change
src/grid/Body.mjsto extendNeo.component.Base.
- Change
-
Row Pool Management:
- Replace the
itemsconfig with a private/protected class field (e.g.,items = []) to storeNeo.grid.Rowinstances. - Update
createRowPoolto instantiate rows with:parentId: me.id, appName : me.appName, windowId: me.windowId, theme : me.theme
- Replace the
-
Lifecycle Management:
- Implement
destroy()to manually iterate and destroy row instances inthis.items.
- Implement
-
Config Propagation (Container Behavior Mimicry):
- Implement
afterSetAppName,afterSetMounted,afterSetTheme, andafterSetWindowId. - These methods must iterate over
this.itemsand update the corresponding properties on the row instances, ensuring correct state propagation (theme changes, window moves, etc.).
- Implement
-
Verification:
- Ensure
Neo.manager.Componentmethods (down,query) still function correctly by relying on theparentIdlink.
- Ensure
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.
Reactions are currently unavailable