Skip to content

Commit

Permalink
fix(chart): sw-2707 shallow comparison for context (RedHatInsights#1480)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera authored Nov 13, 2024
1 parent ec6b23c commit 3935bf0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/chart/chart.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useRef, useState } from 'react';
import React, { useRef, useState } from 'react';
import PropTypes from 'prop-types';
import { ChartThemeColor } from '@patternfly/react-charts';
import { useShallowCompareEffect } from 'react-use';
import { ChartContext } from './chartContext';
import { ChartElements } from './chartElements';
import { ChartLegend } from './chartLegend';
Expand Down Expand Up @@ -61,7 +62,7 @@ const Chart = ({
const tooltipRef = useRef(null);
const { width: chartWidth } = useResizeObserver(containerRef);

useEffect(() => {
useShallowCompareEffect(() => {
/**
* Aggregate chart related settings.
*
Expand Down

0 comments on commit 3935bf0

Please sign in to comment.