LearnNewsExamplesServices
Frontmatter
id7182
titleEnhance `grid.VerticalScrollbar` to Support Chunked Store Loading
stateClosed
labels
enhancement
assigneestobiu
createdAtAug 11, 2025, 2:29 PM
updatedAtAug 11, 2025, 2:40 PM
githubUrlhttps://github.com/neomjs/neo/issues/7182
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtAug 11, 2025, 2:40 PM

Enhance grid.VerticalScrollbar to Support Chunked Store Loading

Closed v10.5.0 enhancement
tobiu
tobiu commented on Aug 11, 2025, 2:29 PM

Is your feature request related to a problem? Please describe.

The grid.VerticalScrollbar was not correctly handling the "instant preview" feature for chunked store loads. When a large dataset was being added, the scrollbar's height was initially calculated based on the first small chunk of data, not the final total. This resulted in an incorrectly sized scrollbar until the full dataset was loaded, creating a poor user experience and layout shifts.

Describe the solution you'd like

The grid.VerticalScrollbar has been enhanced to fully support the chunked loading mechanism of data.Store.

  1. updateScrollHeight() now uses data.total: The method now accepts the store's load event object as a parameter. It has been updated to prioritize the data.total property (when available during a chunked load) over store.count to determine the number of records. This ensures the scrollbar's height is calculated based on the final dataset size from the very first load event.

  2. Lifecycle Simplification: The afterSetStore method was also simplified. A redundant manual call to updateScrollHeight() was removed, as the component now correctly relies on the store's guaranteed load event (which fires after listeners are attached) to perform its initial setup.

Benefits of this approach:

  • Correct Scrollbar Sizing: The vertical scrollbar's height is now immediately and accurately sized to reflect the entire dataset during a chunked load, providing a stable and correct UI.
  • Improved User Experience: Prevents the scrollbar from "jumping" or resizing, which is a much smoother experience.
  • Code Simplification & Robustness: The component's logic is now cleaner and more robustly aligned with the framework's event lifecycle.
tobiu assigned to @tobiu on Aug 11, 2025, 2:29 PM
tobiu added the enhancement label on Aug 11, 2025, 2:29 PM
tobiu referenced in commit 2699c10 - "Enhance grid.VerticalScrollbar to Support Chunked Store Loading #7182" on Aug 11, 2025, 2:29 PM
tobiu closed this issue on Aug 11, 2025, 2:29 PM
tobiu
tobiu Aug 11, 2025, 2:39 PM

we need to soften the check a bit more.

tobiu reopened this issue on Aug 11, 2025, 2:39 PM
tobiu referenced in commit c1df85b - "#7182 hotfix" on Aug 11, 2025, 2:40 PM
tobiu closed this issue on Aug 11, 2025, 2:40 PM