mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
Get sections to render when switching datasource (#1660)
* Get sections to render when switching datasource - Move sectionsToRender in store and use is for defaultFormData - Change some SelectField to FreeFormSelect according to forms.py * Solved the css not found problem in staging * Fixed js tests
This commit is contained in:
@@ -69,7 +69,8 @@ export const exploreReducer = function (state, action) {
|
||||
},
|
||||
[actions.SET_FIELD_VALUE]() {
|
||||
const newFormData = action.key === 'datasource' ?
|
||||
defaultFormData(state.viz.form_data.viz_type) : Object.assign({}, state.viz.form_data);
|
||||
defaultFormData(state.viz.form_data.viz_type, action.datasource_type) :
|
||||
Object.assign({}, state.viz.form_data);
|
||||
if (action.key === 'datasource') {
|
||||
newFormData.datasource_name = action.label;
|
||||
newFormData.slice_id = state.viz.form_data.slice_id;
|
||||
|
||||
Reference in New Issue
Block a user