michael-s-molina commented on code in PR #20891:
URL: https://github.com/apache/superset/pull/20891#discussion_r941648346
##########
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:
I don't want to return unless the state changes. If the state is the same,
it should execute the code below these lines.
```
if (!isEqual(this.state, nextState)) {
return true;
}
this.hasQueryResponseChange = nextProps.queriesResponse !==
this.props.queriesResponse;
...
```
--
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]