reveha commented on code in PR #41111:
URL: https://github.com/apache/superset/pull/41111#discussion_r3452188725
##########
superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx:
##########
@@ -201,6 +208,14 @@ function Echart(
chartRef.current?.on(name, handler);
});
+ previousQueryEventHandlers.current.forEach(({ name, handler }) => {
+ chartRef.current?.off(name, handler);
+ });
+ (queryEventHandlers || []).forEach(({ name, query, handler }) => {
+ chartRef.current?.on(name, query, handler);
+ });
+ previousQueryEventHandlers.current = queryEventHandlers || [];
Review Comment:
Thanks, fixed. I moved the query listener cleanup before rebinding the
regular listeners. I also fixed horizontal bar cross-filtering to read the
category value from the rendered category axis, so bar clicks and y-axis label
clicks produce the same filter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]