Ticket #2 (closed defect: wontfix)
Scrolling enters an infinite loop
| Reported by: | kevin.conaway@… | Owned by: | tsuckow |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | grid view | Version: | |
| Keywords: | Cc: |
Description
We're having a problem where scrolling through the LiveGrid? causes it to enter an infinite loop where it keeps requesting data from the store.
The problem seems to be that the rowIndex doesn't get updated to be within the predicited buffer offset. I added some logging to illustrate the issue:
onLiveScroll: Scrolled and set rowIndex: 0
onLiveScroll: Scrolled and set rowIndex: 1 updateLiveRows -> isInRange: 1 >= 0 && 20 <= 19
updateLiveRows: lastIndex was 0
updateLiveRows: new index 1
updateLiveRows -> isInRange: 1 >= 0 && 20 <= 19
updateLiveRows: 1 not inRange: false
updateLiveRows: Predicted bufferOffset: 11
// Store gets loaded
loadRecords: Set bufferRange to [11,30]
liveBufferUpdate -> isInRange 1 >= 11 && 20 <= 30
At this point, updateLiveRows is called and the whole process repeats itself indefinitely. The problem appears to be that the predicted buffer offset is always "predicted" to be ahead of the rowIndex but the rowIndex is never updated.
The GridPanel? has a height of 530px, a bufferSize of 20, and nearLimit of 1.
If I change the height from 530px to 200px, the scrolling seems to work OK.
