mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(dashboard): add animation state to fix tab switch re-renders (#10475)
This commit is contained in:
@@ -63,6 +63,8 @@ const propTypes = {
|
||||
onQuery: PropTypes.func,
|
||||
onFilterMenuOpen: PropTypes.func,
|
||||
onFilterMenuClose: PropTypes.func,
|
||||
// id of the last mounted parent tab
|
||||
mountedParent: PropTypes.string,
|
||||
};
|
||||
|
||||
const BLANK = {};
|
||||
|
||||
@@ -86,8 +86,7 @@ class ChartRenderer extends React.Component {
|
||||
if (resultsReady) {
|
||||
this.hasQueryResponseChange =
|
||||
nextProps.queryResponse !== this.props.queryResponse;
|
||||
|
||||
if (
|
||||
return (
|
||||
this.hasQueryResponseChange ||
|
||||
nextProps.annotationData !== this.props.annotationData ||
|
||||
nextProps.height !== this.props.height ||
|
||||
@@ -95,9 +94,7 @@ class ChartRenderer extends React.Component {
|
||||
nextProps.triggerRender ||
|
||||
nextProps.formData.color_scheme !== this.props.formData.color_scheme ||
|
||||
nextProps.cacheBusterProp !== this.props.cacheBusterProp
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user