Skip to content

Commit

Permalink
fix when label color was changed
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenLYZ committed Sep 21, 2022
1 parent f222ec9 commit 831676d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ describe('dashboardState actions', () => {

const removeFilter = dispatch.getCall(0).args[0];
removeFilter(dispatch, getState);
expect(dispatch.getCall(4).args[0].type).toBe(REMOVE_FILTER);
expect(dispatch.getCall(3).args[0].type).toBe(REMOVE_FILTER);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,12 @@ class Chart extends React.Component {
}
}
} else if (
// chart should re-render if color scheme was changed
nextProps.formData?.color_scheme !== this.props.formData?.color_scheme
// chart should re-render if color scheme or label color was changed
nextProps.formData?.color_scheme !== this.props.formData?.color_scheme ||
!areObjectsEqual(
nextProps.formData?.label_colors,
this.props.formData?.label_colors,
)
) {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def _try_json_readsha(filepath: str, length: int) -> Optional[str]:
"UX_BETA": False,
"GENERIC_CHART_AXES": False,
"ALLOW_ADHOC_SUBQUERY": False,
"USE_ANALAGOUS_COLORS": True,
"USE_ANALAGOUS_COLORS": False,
"DASHBOARD_EDIT_CHART_IN_NEW_TAB": False,
# Apply RLS rules to SQL Lab queries. This requires parsing and manipulating the
# query, and might break queries and/or allow users to bypass RLS. Use with care!
Expand Down

0 comments on commit 831676d

Please sign in to comment.