diff --git a/packages/jaeger-ui/src/components/App/Page.tsx b/packages/jaeger-ui/src/components/App/Page.tsx index 162528eff0..86caec2137 100644 --- a/packages/jaeger-ui/src/components/App/Page.tsx +++ b/packages/jaeger-ui/src/components/App/Page.tsx @@ -42,10 +42,9 @@ export class PageImpl extends React.Component { trackPageView(pathname, search); } - // eslint-disable-next-line camelcase - UNSAFE_componentWillReceiveProps(nextProps: TProps) { - const { pathname, search } = this.props; - const { pathname: nextPathname, search: nextSearch } = nextProps; + componentDidUpdate(prevProps: Readonly) { + const { pathname, search } = prevProps; + const { pathname: nextPathname, search: nextSearch } = this.props; if (pathname !== nextPathname || search !== nextSearch) { trackPageView(nextPathname, nextSearch); } diff --git a/packages/jaeger-ui/src/components/DeepDependencies/index.tsx b/packages/jaeger-ui/src/components/DeepDependencies/index.tsx index 5a4915f3f6..5dbf796c33 100644 --- a/packages/jaeger-ui/src/components/DeepDependencies/index.tsx +++ b/packages/jaeger-ui/src/components/DeepDependencies/index.tsx @@ -118,9 +118,8 @@ export class DeepDependencyGraphPageImpl extends React.PureComponent { diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.tsx b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.tsx index 0edb6d3ed5..e5eaf0a937 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.tsx +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.tsx @@ -137,10 +137,9 @@ export default class TimelineViewingLayer extends React.PureComponent) { const { boundsInvalidator } = this.props; - if (boundsInvalidator !== nextProps.boundsInvalidator) { + if (prevProps.boundsInvalidator !== boundsInvalidator) { this._draggerReframe.resetBounds(); } } diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx index d8ba3b2fbd..4e4a8aa6a8 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/VirtualizedTraceView.tsx @@ -179,10 +179,12 @@ export class VirtualizedTraceViewImpl extends React.Component) { + const { childrenHiddenIDs, detailStates, registerAccessors, trace, currentViewRangeTime } = prevProps; const { + shouldScrollToFirstUiFindMatch, + clearShouldScrollToFirstUiFindMatch, + scrollToFirstVisibleSpan, currentViewRangeTime: nextViewRangeTime, childrenHiddenIDs: nextHiddenIDs, detailStates: nextDetailStates, @@ -190,13 +192,16 @@ export class VirtualizedTraceViewImpl extends React.Component { mergeShortcuts(shortcutCallbacks); } - // eslint-disable-next-line camelcase - UNSAFE_componentWillReceiveProps(nextProps: TProps) { - const { trace } = nextProps; - this._scrollManager.setTrace(trace && trace.data); - } - componentDidUpdate({ id: prevID }: TProps) { const { id, trace } = this.props; + + this._scrollManager.setTrace(trace && trace.data); + this.setHeaderHeight(this._headerElm); if (!trace) { this.ensureTraceFetched();