-
-
Notifications
You must be signed in to change notification settings - Fork 202
Grid Body fast path fails to update Row mounted state, breaking OffscreenCanvas recovery #9108
Description
The Neo.grid.Body#onStoreLoad method has a "fast path" for clearing the grid when the store has 0 items (e.g., due to filtering). This path directly clears the VDOM children (vdomRoot.cn = []) and the real DOM (textContent: '') to avoid expensive VDOM diffing.
However, this bypasses the standard lifecycle updates for the pooled Row components. They remain in me.items with mounted: true, even though they are physically removed from the DOM.
When the store reloads with data, these Row components are re-added to the VDOM. Since their mounted config is still true, the afterSetMounted hook is not triggered. This prevents child components like OffscreenCanvas (used in Sparklines) from triggering their reconnection logic ("healing"), causing charts to disappear.
Proposed Fix:
- In
onStoreLoad(fast path): Explicitly setmounted = falsefor allRowitems. - In
createViewData: Explicitly ensuremounted = truefor allRowitems if the Body itself is mounted.
This synchronizes the component state with the physical DOM state while preserving the performance benefits of the fast path.