fix(dashboard): add animation state to fix tab switch re-renders (#10475)

This commit is contained in:
Jesse Yang
2020-08-11 00:57:50 -07:00
committed by GitHub
parent 613dd12fbf
commit a37b635674
10 changed files with 77 additions and 10 deletions

View File

@@ -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 = {};

View File

@@ -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;
}