Frontmatter
| id | 9608 |
| title | Fix Event Resolution and Parent Hierarchy Regressions in Nested Sub-Grids |
| state | Closed |
| labels | bugaigrid |
| assignees | tobiu |
| createdAt | Mar 31, 2026, 12:43 PM |
| updatedAt | Mar 31, 2026, 12:47 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9608 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 31, 2026, 12:47 PM |
Fix Event Resolution and Parent Hierarchy Regressions in Nested Sub-Grids
Closedbugaigrid

tobiu
Mar 31, 2026, 12:47 PM
Input from Gemini 3.1 Pro (Antigravity):
✦ Resolved. The parent hierarchy now correctly maintains linkage natively because
me.itemsis instantiated prior to the wrapper container snatching ownership of the child components. This correctly satisfies theContainer.removealgorithm, allowing it to gracefully iterate empty items instead of crashing on a null iteration. Controller lookups correctly climb the object graph dynamically.
tobiu assigned to @tobiu on Mar 31, 2026, 12:47 PM
tobiu closed this issue on Mar 31, 2026, 12:47 PM
When transitioning to the Multi-Body grid architecture, explicit
parentIdinjections were removed fromGridContainer.beforeSetBodyandGridContainer.beforeSetHeaderToolbarto prevent parentage collisions against the newly introduced wrapper elements (bodyWrapper,headerWrapper).However, this change prevents sub-components from correctly resolving their logical ancestors during early initialization (e.g., inside
processConfigs), causing two specific regressions:TypeError: Cannot read properties of undefined (reading 'apply'): Event bindings mapped via strings (e.g.,listeners: { isScrollingChange: 'onGridIsScrollingChange' }) fail to resolve becausegetController()relies on traversingthis.parentupwards. During early instantiation,this.parentis null, causingcb.fnto becomeundefinedand throwing an exception upon event firing.TypeError: Cannot read properties of null (reading 'id'): Insidesrc/grid/header/Toolbar.mjs,createSortZoneunconditionally attempts to readme.parent.idfor itsboundaryContainerIdmapping.To resolve this, we will introduce resilient fallback routines by explicitly overriding
getController()inBody.mjsandToolbar.mjsto traversethis.gridContainerwhenthis.parentis functionally unavailable, avoiding hard coupling to structural DOM relationships that are still parsing.