sadpandajoe commented on code in PR #36050:
URL: https://github.com/apache/superset/pull/36050#discussion_r2674303008
##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.jsx:
##########
@@ -878,8 +1105,15 @@ export class TableRenderer extends Component {
return document.contains(document.querySelector('.dashboard--editing'));
}
+ componentWillUnmount() {
+ this.sortCache.clear();
+ }
+
render() {
if (this.cachedProps !== this.props) {
+ this.sortCache.clear();
+ this.state.sortingOrder = [];
+ this.state.activeSortColumn = null;
Review Comment:
Is this mutating a state inside of a `render()`? Should we be resetting
using a `setState` instead?
--
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]