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.
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.
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.
Is your feature request related to a problem? Please describe.
The
grid.VerticalScrollbarwas 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.VerticalScrollbarhas been enhanced to fully support the chunked loading mechanism ofdata.Store.updateScrollHeight()now usesdata.total: The method now accepts the store'sloadevent object as a parameter. It has been updated to prioritize thedata.totalproperty (when available during a chunked load) overstore.countto determine the number of records. This ensures the scrollbar's height is calculated based on the final dataset size from the very firstloadevent.Lifecycle Simplification: The
afterSetStoremethod was also simplified. A redundant manual call toupdateScrollHeight()was removed, as the component now correctly relies on the store's guaranteedloadevent (which fires after listeners are attached) to perform its initial setup.Benefits of this approach: