Skip to content

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Aug 13, 2025

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

  • Bugfix

@vursen vursen changed the title fix: cancel debounced requests if all data has been received fix: cancel request debouncer if all data has been received Aug 13, 2025
@@ -73,7 +82,7 @@ describe('grid connector', () => {

beforeEach(async () => {
// Use a smaller page size for testing
grid.pageSize = 25;
grid.pageSize = 10;
Copy link
Contributor Author

@vursen vursen Aug 13, 2025

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.

@vursen vursen requested a review from sissbruecker August 13, 2025 07:15
@@ -92,6 +92,7 @@ public void columnTooltipOverridesGridTooltip() {
scrollToElement(grid);
// set grid tooltip
clickElementWithJs("set-grid-tooltip-button");
flushScrolling(grid);
Copy link
Contributor Author

@vursen vursen Aug 13, 2025

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.

Copy link

@vursen vursen merged commit 0551832 into main Aug 15, 2025
5 checks passed
@vursen vursen deleted the cancel-debounced-requests-if-all-data-received branch August 15, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants