Skip to content
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

refactor: clean up grid column auto width mixin #8512

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

tomivirkki
Copy link
Member

@tomivirkki tomivirkki commented Jan 15, 2025

Description

Follow-up for #8507

This PR cleans up the newly added ColumnAutoWidthMixin

  • All checks for whether grid is ready for column width recalculation are now performed in a single function (__isReadyForColumnWidthCalculation) instead of having them scattered around like before
    • recalculateColumnWidths is now short and clean
  • All external calls to the mixin's functions (__tryToRecalculateColumnWidthsIfPending, recalculateColumnWidths) are removed. The mixin itself uses property observers and event listeners to determine when they should be called.

Related to vaadin/flow-components#6976

Type of change

Refactor

@tomivirkki tomivirkki marked this pull request as draft January 15, 2025 12:03
@tomivirkki tomivirkki marked this pull request as ready for review January 15, 2025 12:09
@tomivirkki tomivirkki merged commit e34b3ba into main Jan 15, 2025
9 checks passed
@tomivirkki tomivirkki deleted the refactor/auto-width-mixin branch January 15, 2025 13:53
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.7.0.alpha5 and is also targeting the upcoming stable 24.7.0 version.

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.

None yet

3 participants