KEMBAR78
fix: remove excess items from cache when size decreases by vursen · Pull Request #10222 · vaadin/web-components · GitHub
Skip to content

Conversation

@vursen
Copy link
Contributor

@vursen vursen commented Sep 24, 2025

Description

The PR fixes an issue where the data provider controller didn't remove excess items from the cache when its size decreased, leaving them stuck in memory until clearCache was explicitly called.

Finding from vaadin/flow-components#8040

Type of change

  • Bugfix

@sonarqubecloud
Copy link

});

it('should re-render the cell when last row leaves the viewport on resize', () => {
it('should re-render the first cell when last row leaves the viewport on resize', () => {
Copy link
Contributor Author

@vursen vursen Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests relied on incorrect behavior where the grid didn't remove items exceeding the new cache size. This incorrectly resulted in the data provider not being called when the size increased again since those items were already present in the cache.

@web-padawan web-padawan removed the request for review from sissbruecker September 24, 2025 12:32
@web-padawan web-padawan merged commit 36d7d2b into main Sep 24, 2025
9 checks passed
@web-padawan web-padawan deleted the remove-exceeding-items-when-decreasing-size branch September 24, 2025 12:32
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-alpha12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants