mirror of
https://github.com/apache/superset.git
synced 2026-05-30 04:39:20 +00:00
feat(explore): Remove default for time range filter and Metrics (#14661)
* feat(explore): Remove default for time range filter and Metrics * Merge errors with same messages * Fix e2e test * Rename a variable * Bump packages * Fix unit tests
This commit is contained in:
committed by
GitHub
parent
add35f9fe4
commit
63dc035d6a
@@ -135,6 +135,24 @@ export default function exploreReducer(state = {}, action) {
|
||||
...getControlStateFromControlConfig(controlConfig, state, action.value),
|
||||
};
|
||||
|
||||
const newState = {
|
||||
...state,
|
||||
controls: { ...state.controls, [action.controlName]: control },
|
||||
};
|
||||
|
||||
const rerenderedControls = {};
|
||||
if (Array.isArray(control.rerender)) {
|
||||
control.rerender.forEach(controlName => {
|
||||
rerenderedControls[controlName] = {
|
||||
...getControlStateFromControlConfig(
|
||||
newState.controls[controlName],
|
||||
newState,
|
||||
newState.controls[controlName].value,
|
||||
),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
// combine newly detected errors with errors from `onChange` event of
|
||||
// each control component (passed via reducer action).
|
||||
const errors = control.validationErrors || [];
|
||||
@@ -169,6 +187,7 @@ export default function exploreReducer(state = {}, action) {
|
||||
...control,
|
||||
validationErrors: errors,
|
||||
},
|
||||
...rerenderedControls,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user