You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the AutoSizeVirtualScrollStrategy with the appendOnly input set to true, the viewRange event emitter output (of type ListRange with the start and end properties) always has its start value set to 0, regardless of the current scroll position in the list.
This behavior appears to be caused by the following snippet in the calcRenderedRange method of autosize-virtual-scroll-stategy.ts:
This logic ensures that the start value in the viewRange output does not increase beyond the initial value when appendOnly is true.
If _renderedRange.start is 0, range.start will always remain 0
Expected Behavior
When appendOnly is true, the viewRange.start should reflect the actual visible range of items in the viewport not the whole runway.
Or there should be a way to configure this behavior.
Or alternatively, there could be two outputs:
One for the rendered range (current behavior).
Another for the visible range (reflecting the range of items that are currently visible in the viewport).
Actual Behavior
When appendOnly is true, viewRange.start always remains 0, regardless of the current scroll position.
Steps to Reproduce the Issue
Use the AutoSizeVirtualScrollStrategy with the appendOnly input set to true.
Bind to the viewRange output and observe its start value while scrolling through the list.
Notice that viewRange.start remains 0, even when scrolling to the bottom of the list.
This issue is particularly problematic for applications that rely on lazy data loading, as it can lead to:
Delayed Data Loading: Since viewRange.start is always 0, it becomes difficult to determine the actual range of visible items. This can lead to unnecessary data requests for items that are no longer visible, causing delays in loading the last data chunk when scrolling to a specific index or even to the bottom.
Inefficient Data Management: Developers cannot efficiently manage data requests based on the actual visible range of items
Questions
Is This Behavior Intended?
Is it intentional that viewRange.start remains 0 when appendOnly is true? If so, could you clarify the reasoning behind this design decision?
Can This Be Made Configurable?
Would it be possible to introduce a configuration option to allow viewRange.start to reflect the actual visible range of items, even when appendOnly is true?
Can Two Outputs Be Provided?
Could you consider providing two separate outputs:
One for the rendered range (current viewRange behavior).
Another for the visible range (reflecting the items currently visible in the viewport)?
This would allow developers to handle lazy data requesting/loading more effectively while still benefiting from the appendOnly behavior for things like drag & drop etc.
BR,
Vincent
The text was updated successfully, but these errors were encountered:
Description
When using the
AutoSizeVirtualScrollStrategy
with theappendOnly
input set totrue
, the viewRange event emitter output (of type ListRange with the start and end properties) always has its start value set to 0, regardless of the current scroll position in the list.This behavior appears to be caused by the following snippet in the
calcRenderedRange
method ofautosize-virtual-scroll-stategy.ts
:This logic ensures that the start value in the viewRange output does not increase beyond the initial value when appendOnly is true.
If _renderedRange.start is 0, range.start will always remain 0
Expected Behavior
When appendOnly is true, the viewRange.start should reflect the actual visible range of items in the viewport not the whole runway.
Or there should be a way to configure this behavior.
Or alternatively, there could be two outputs:
Actual Behavior
When appendOnly is true, viewRange.start always remains 0, regardless of the current scroll position.
Steps to Reproduce the Issue
Use the AutoSizeVirtualScrollStrategy with the appendOnly input set to true.
Bind to the viewRange output and observe its start value while scrolling through the list.
Notice that viewRange.start remains 0, even when scrolling to the bottom of the list.
Environment
Related to Other Issues
#1765
This issue is particularly problematic for applications that rely on lazy data loading, as it can lead to:
Questions
Is This Behavior Intended?
Can This Be Made Configurable?
Can Two Outputs Be Provided?
This would allow developers to handle lazy data requesting/loading more effectively while still benefiting from the appendOnly behavior for things like drag & drop etc.
BR,
Vincent
The text was updated successfully, but these errors were encountered: