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

BugFix: Async Column Styles #666

Merged

Conversation

cassmbautista
Copy link
Contributor

@cassmbautista cassmbautista commented Feb 20, 2020

VGT was using setTimeout to apply styles for fixed headers. This is now covered by watchers detecting when the styling changes need to be re-applied.

  • Added a watcher for column changes to fix issue Async column styling #653
  • Removed setTimeout in setColumnStyles to fix async testing issues.

When testing in Jest the snapshots sometimes render like:

-<th class="vgt-left-align sorting sortable">
+<th class="vgt-left-align sorting sortable" style="min-width: auto; max-width: auto; width: auto;">

This occurred due to the setTimeout occasionally finishing before the snapshot fired. This can be fixed at the test level by using Jest's fakeTimers. This approach works in some cases, however it adds complexity and does not work with Vue-Test-Utils in all scenarios.

@TheJaredWilcurt TheJaredWilcurt merged commit bc4aefa into xaksis:master Feb 20, 2020
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.

2 participants