-
Notifications
You must be signed in to change notification settings - Fork 71
fix: cancel request debouncer if all data has been received #7840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -73,7 +82,7 @@ describe('grid connector', () => { | |||
|
|||
beforeEach(async () => { | |||
// Use a smaller page size for testing | |||
grid.pageSize = 25; | |||
grid.pageSize = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to adjust these tests to ensure that at least two pages fit within the viewport. Previously, this wasn't the case, and the tests passed only because the requests created by the clear method weren't cancelled rather than because the rows were actually visible.
@@ -92,6 +92,7 @@ public void columnTooltipOverridesGridTooltip() { | |||
scrollToElement(grid); | |||
// set grid tooltip | |||
clickElementWithJs("set-grid-tooltip-button"); | |||
flushScrolling(grid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test previously incorrectly passed without flushScrolling(grid)
because of an extra setViewport
request that wasn't cancelled.
|
Description
Ensures that gridConnector's request debouncer is cancelled if all data has been already received from the server while the debouncer was waiting. This scenario can take place for example when calling
$connector.reset()
on a non-empty grid.Extracted from #7676
Type of change