mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
[explorev2] Make chart container more responsive (#1724)
* Make chart container more responsive **Leave chart empty when theres error **Make all boolean fields auto-query chart when changed * Replace forEach with some * Added fields to autoQueryFields
This commit is contained in:
@@ -33,12 +33,10 @@ class ExploreViewContainer extends React.Component {
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
let refreshChart = false;
|
||||
autoQueryFields.forEach((field) => {
|
||||
if (nextProps.form_data[field] !== this.props.form_data[field]) {
|
||||
refreshChart = true;
|
||||
}
|
||||
});
|
||||
const refreshChart = Object.keys(nextProps.form_data).some((field) => (
|
||||
nextProps.form_data[field] !== this.props.form_data[field]
|
||||
&& autoQueryFields.indexOf(field) !== -1)
|
||||
);
|
||||
if (refreshChart) {
|
||||
this.onQuery(nextProps.form_data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user