Skip to content

Conversation

ugur-vaadin
Copy link
Contributor

Description

When the initial items are loaded lazily without changing the data provider, the column widths are not recalculated. This is especially the case when the component is used via the Flow counterpart.

This PR recalculates the column widths when

  • the column width hasn't been calculated with non-zero number of rows before
  • the number of items change to a non-zero value

Fixes vaadin/flow-components#7309

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/pr
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Copy link

@ugur-vaadin ugur-vaadin removed the request for review from vursen August 1, 2025 09:59
@ugur-vaadin ugur-vaadin merged commit 41b4fc4 into main Aug 1, 2025
10 checks passed
@ugur-vaadin ugur-vaadin deleted the fix-recalculate-column-widths-on-initial-item-load-with-same-data-provider branch August 1, 2025 09:59
web-padawan pushed a commit that referenced this pull request Aug 1, 2025
…ovider (#9859) (#9868)

Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
web-padawan pushed a commit that referenced this pull request Aug 1, 2025
…ovider (#9859) (#9867)

Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
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.

Grid columns with auto-width not calculated correctly after upgrade to 24.7
3 participants