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: avoid visualization plugin double render #1665

Merged
merged 6 commits into from
Mar 19, 2021

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Mar 17, 2021

Key features

  1. avoid visualization plugin double render

Description

The cause for it was the userSettings prop passed to VisualizationPlugin. The prop was a new object every time, causing unwanted re-render.
The fix prevents the Highcharts config generation to run multiple times.

This avoids a double render issue which causes the Highcharts config
generation to run twice.
edoardo and others added 4 commits March 18, 2021 11:49
This avoids a double render issue which causes the Highcharts config
generation to run twice.
This happened in dashboards where id is not passed to ChartPlugin
because the re-render on resize with no animation is only needed in DV.
@edoardo edoardo merged commit c6c348c into master Mar 19, 2021
@edoardo edoardo deleted the fix/vis-plugin-double-render branch March 19, 2021 12:05
dhis2-bot added a commit that referenced this pull request Mar 19, 2021
## [35.20.20](v35.20.19...v35.20.20) (2021-03-19)

### Bug Fixes

* avoid visualization plugin double render ([#1665](#1665)) ([c6c348c](c6c348c))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 35.20.20 🎉

The release is available on:

Your semantic-release bot 📦🚀

janhenrikoverland pushed a commit that referenced this pull request Mar 31, 2021
* refactor: remove unused action

* fix: pass the same userSettings object to VisualizationPlugin props

This avoids a double render issue which causes the Highcharts config
generation to run twice.

* refactor: list all used props in the deconstructor

* fix: init id as null to avoid rerender when not passed

This happened in dashboards where id is not passed to ChartPlugin
because the re-render on resize with no animation is only needed in DV.

Co-authored-by: Martin Ohlson <martin@moid.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants