diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx index 13dfe298f5267..5795599d96196 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/metrics.tsx @@ -60,7 +60,12 @@ const TabComponent = (props: TabProps) => { const memoryChartRef = useRef(null); const loadChartRef = useRef(null); const [time, setTime] = useState(60 * 60 * 1000); - const chartRefs = [cpuChartRef, networkChartRef, memoryChartRef, loadChartRef]; + const chartRefs = useMemo(() => [cpuChartRef, networkChartRef, memoryChartRef, loadChartRef], [ + cpuChartRef, + networkChartRef, + memoryChartRef, + loadChartRef, + ]); const { sourceId, createDerivedIndexPattern } = useSourceContext(); const { nodeType, accountId, region } = useWaffleOptionsContext(); const { currentTime, options, node } = props;