-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] chart: avoid useless chart updates
There was an `useEffect` in the `chartJS` component to update the chartJS object on runtime change. There was 2 problems: 1) useEffect on object compare the references, so if the chart plugin was ever changed to return copy of runtime it would break 2) the chart plugin re-build every chartRuntime on each command that could affect a chart. This created a chart update at each UPDATE_CELL even if the actual runtime didn't change. This commit replace the `useEffect` dependency with a `deepEquals` closes #4154 Task: 3697660 X-original-commit: 6eb4353 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
- Loading branch information
1 parent
e3fba58
commit 0cfca7e
Showing
5 changed files
with
35 additions
and
10 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