mirror of
https://github.com/apache/superset.git
synced 2026-04-24 10:35:01 +00:00
feat(SQL Lab): Make SQL Lab explore use the default viz from the config file (#20056)
* Modified SQL Lab so it uses the default viz to explore a new dataset with * Added a comment to the config file * Remove trailing whitespace * [CLDN-1312] Removed the 'viz_type' variable so that when it is undefinded in the back-end, it gets set to the default viz * [CLDN-1312] Only sets the 'all_columns' variable if the default viz type is a 'table' * Will only pop 'selectedColumns' out of 'form_data' if it is present * [CLDN-1312] Updated files so that the default viz is now being used again in SQL Lab Explore
This commit is contained in:
@@ -159,9 +159,7 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
|
||||
exploreChart({
|
||||
...EXPLORE_CHART_DEFAULT,
|
||||
datasource: `${datasetToOverwrite.datasetId}__table`,
|
||||
all_columns: query.results.selected_columns.map(
|
||||
(d: { name: string; type: string; is_dttm: boolean }) => d.name,
|
||||
),
|
||||
selected_columns: query.results.selected_columns,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -243,8 +241,7 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
|
||||
metrics: [],
|
||||
groupby: [],
|
||||
time_range: 'No filter',
|
||||
viz_type: 'table',
|
||||
all_columns: selectedColumns.map(c => c.name),
|
||||
selectedColumns,
|
||||
row_limit: 1000,
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user