-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: plugin flashes when interacting with Interpretations modal (#3017)
Fixes DHIS2-15570 Fixes DHIS2-17137 Prevent re-requests for analytics, and resulting re-renders that were giving a flashing effect. * InterpretationModal: memoize the callback to avoid a re-render due to a "new" function being passed with each render of InterpretationModal. The effect of this change is minor, probably just 1 rerender * VisualizationPlugin: ensure that the size of the plugin is set when it is coming from the modal so that when changing the width of the viewport, the visualization adjusts its size accordingly. (Previously this "worked" but only because of all the re-fetch/re-renders) * VisualizationPluginWrapper: need to listen to the individual properties, rather than the whole props object since that was triggering lots of unnecessary re-fetch/renders. * set the max-height to respect viewport so that vertical resize causes the chart to adjust accordingly
- Loading branch information
1 parent
43f89be
commit 1799592
Showing
6 changed files
with
85 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters