You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The click handler for the button to remove a metric on the chart page is throwing an exception, breaking the ability to remove metrics from a chart.
Uncaught TypeError: Cannot read properties of undefined (reading 'stopPropagation')
at yt.onRemoveMetric (AdhocMetricOption.jsx:51:7)
at onClick (index.tsx:313:11)
at Object.l (react-dom.production.min.js:14:84)
at p (react-dom.production.min.js:14:238)
at react-dom.production.min.js:14:292
at b (react-dom.production.min.js:15:72)
at ot (react-dom.production.min.js:52:146)
at rt (react-dom.production.min.js:51:255)
at it (react-dom.production.min.js:52:334)
at ft (react-dom.production.min.js:56:10)
How to reproduce the bug
Go to any chart editing page
Click on the "x" on the left side of a metric that is already added to the chart
Check the browsers dev tools/console for the exception
Thanks for the report! Pinging @michael-s-molina in regards to his linked PR, and also pinging @kgabryje as a person who often deals with this sort of control input issue, for good measure. Hopefully, we can not just fix this, but also add some tests here to harden this.
The click handler for the button to remove a metric on the chart page is throwing an exception, breaking the ability to remove metrics from a chart.
How to reproduce the bug
Expected results
Metric should be removed from the list
Actual results
The metric remains on the chart
Screenshots
Environment
(please complete the following information):
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
The onRemoveMetric handler expects to be passed the event object
I believe this is the PR that introduced the bug, as it changed how the
onRemove
handler is invoked, no-longer passing the event objectThe text was updated successfully, but these errors were encountered: