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

fix: Use offsetWidth for column auto width calculation #1745

Merged
merged 2 commits into from
Jun 3, 2020

Conversation

tomivirkki
Copy link
Member

Fixes #1723

@@ -484,7 +484,7 @@
col._currentWidth = 0;
// Note: _allCells only contains cells which are currently rendered in DOM
col._allCells.forEach(c => {
const cellWidth = Math.ceil(c.getBoundingClientRect().width);
Copy link
Member Author

Choose a reason for hiding this comment

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

element.getBoundingClientRect().width is affected by the visual scaling of the element whereas element.offsetWidth isn't. The original issue was caused by the grid being visually scaled during the dialog opening animation.

@web-padawan web-padawan merged commit d3c9b51 into master Jun 3, 2020
@web-padawan web-padawan deleted the fix-column-auto-width-scaled branch June 3, 2020 13:23
web-padawan added a commit that referenced this pull request Jun 3, 2020
Co-authored-by: Tomi Virkki <tomivirkki@users.noreply.github.com>
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.

Sometimes ellipsis shown in selection column
2 participants