Skip to content

Commit 9bb8477

Browse files
committed
dbconsole: custom metrics update when units change
This fixes a long-standing bug in which changing the axis units fails to update the graph unless you also make some other change. This PR was generated by Claude Code. I asked it to write a test and it produced something with enough mocks that I wasn't sure on the value. I have manually tested this and have confirmed it does result in custom graphs being updated immediately when the axis units are changed. Epic: none Release note: None
1 parent 7635297 commit 9bb8477

File tree

1 file changed

+1
-1
lines changed
  • pkg/ui/workspaces/db-console/src/views/reports/containers/customChart

1 file changed

+1
-1
lines changed

pkg/ui/workspaces/db-console/src/views/reports/containers/customChart/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export class CustomChart extends React.Component<
316316
return (
317317
<MetricsDataProvider
318318
id={`debug-custom-chart.${index}`}
319-
key={index}
319+
key={`${index}-${units}`}
320320
setMetricsFixedWindow={this.props.setMetricsFixedWindow}
321321
setTimeScale={this.props.setTimeScale}
322322
history={this.props.history}

0 commit comments

Comments
 (0)