Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: inject style in props passed to VisualizationPlugin (DHIS2-15126) (
#2322) * fix: inject style in props passed to VisualizationPlugin style is used to compute the correct width when toggling the legend panel in dashboard. style is not passed in props from dashboard because doing so can cause re-rendering of the whole iframe tag which causes refetching of the plugin and everything else (analytics included). * refactor: move the size logic from the plugin wrapper This is because eventually the PluginWrapper component will be replaced by the generic one from app-platform. If possible all custom logic should not be put in other components at the app level. * fix: observe size changes for legend positioning * refactor: rename const for clarity It's a callback ref, not a normal ref. --------- Co-authored-by: Jan Henrik Øverland <[email protected]> Co-authored-by: Martin <[email protected]>
- Loading branch information