Skip to content

Conversation

tulioag
Copy link
Contributor

@tulioag tulioag commented Mar 25, 2020

@tomivirkki
Copy link
Member

Missing a test

@tomivirkki
Copy link
Member

tomivirkki commented Mar 26, 2020

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');
Copy link
Member

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

@tulioag tulioag merged commit 06fdf4e into master Mar 27, 2020
@tulioag tulioag deleted the fix/906_Flickering_when_recreating_grid_with_GridVariant.LUMO_COMPACT branch March 27, 2020 09:35
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.

Flickering when recreating grid with GridVariant.LUMO_COMPACT
2 participants