Skip to content

Commit

Permalink
HPCC-32225 Updeat scopes filter on timeline click
Browse files Browse the repository at this point in the history
Only update if its blank or has an existing "scope filter"

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Jul 11, 2024
1 parent f11a6d1 commit 8cfc04a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion esp/src/src-react/components/Metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,12 @@ export const Metrics: React.FunctionComponent<MetricsProps> = ({
}, [scopesSelectionChanged, scopesTable]);

React.useEffect(() => {
if (!scopeFilter || scopeFilter.indexOf("name:") === 0) {
setScopeFilter(timelineFilter ? `name:${timelineFilter}` : "");
}
scopesTable
.metrics(metrics, options, timelineFilter, scopeFilter)
.render()
.lazyRender()
;
}, [metrics, options, scopeFilter, scopesTable, timelineFilter]);

Expand Down

0 comments on commit 8cfc04a

Please sign in to comment.