-
Notifications
You must be signed in to change notification settings - Fork 155
Calculate column widths on attach #1705
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
Calculate column widths on attach #1705
Conversation
Missing a test |
Found a synchronous solution for this. We could recalculate the column widths whenever the column set changes: _columnTreeChanged(columnTree, splices) {
...
this.recalculateColumnWidths();
} Might still want to also run on attach though, but that can be sync as well: connectedCallback() {
super.connectedCallback();
this.recalculateColumnWidths();
} |
@@ -66,7 +67,7 @@ | |||
|
|||
beforeEach(done => { | |||
grid = fixture('auto-width'); | |||
sinon.spy(grid, '_recalculateColumnWidths'); | |||
spy = sinon.spy(grid, '_recalculateColumnWidths'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: grid._recalculateColumnWidths.reset()
would have probably worked fine as well
Fixes vaadin/vaadin-grid-flow#906