Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2021 The Jaeger Authors.
// SPDX-License-Identifier: Apache-2.0

import React, { useEffect, useState, useRef, useCallback } from 'react';
import React, { useEffect, useState, useRef, useCallback, useLayoutEffect } from 'react';
import { Row, Col, Input, Alert, Select } from 'antd';
import { ActionFunctionAny, Action } from 'redux-actions';
import _debounce from 'lodash/debounce';
Expand Down Expand Up @@ -224,6 +224,14 @@ export function MonitorATMServicesViewImpl(props: TProps) {
};
}, [updateDimensions, calcGraphXDomain]);

// Recalculate graph width once services finish loading, since the graph
// container ref is not mounted while the loading spinner is shown (#3539).
useLayoutEffect(() => {
if (!servicesLoading) {
updateDimensions();
}
}, [servicesLoading, updateDimensions]);
Comment thread
gulshank0 marked this conversation as resolved.

// componentDidUpdate equivalent
useEffect(() => {
if (services.length !== 0) {
Expand Down
Loading