zhaoyongjie commented on code in PR #20891:
URL: https://github.com/apache/superset/pull/20891#discussion_r941496485
##########
superset-frontend/src/components/Chart/ChartRenderer.jsx:
##########
@@ -92,13 +113,16 @@ class ChartRenderer extends React.Component {
};
}
- shouldComponentUpdate(nextProps) {
+ shouldComponentUpdate(nextProps, nextState) {
const resultsReady =
nextProps.queriesResponse &&
['success', 'rendered'].indexOf(nextProps.chartStatus) > -1 &&
!nextProps.queriesResponse?.[0]?.error;
if (resultsReady) {
+ if (!isEqual(this.state, nextState)) {
+ return true;
+ }
Review Comment:
```suggestion
return !isEqual(this.state, nextState)
```
##########
superset-frontend/plugins/plugin-chart-echarts/src/Radar/EchartsRadar.tsx:
##########
@@ -19,18 +19,19 @@
import React, { useCallback } from 'react';
import { RadarChartTransformedProps } from './types';
import Echart from '../components/Echart';
-import { EventHandlers } from '../types';
+import { allEventHandlers } from '../utils/eventHandlers';
-export default function EchartsRadar({
- height,
- width,
- echartOptions,
- setDataMask,
- labelMap,
- groupby,
- selectedValues,
- formData,
-}: RadarChartTransformedProps) {
+export default function EchartsRadar(props: RadarChartTransformedProps) {
+ const {
+ height,
+ width,
+ echartOptions,
+ setDataMask,
+ labelMap,
+ groupby,
+ selectedValues,
+ formData,
+ } = props;
Review Comment:
Why does this change, for readable?
--
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]