mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
feat(explore): Fill dashboard name when adding new chart from dashboard view (#20129)
* feat(explore): Fill dashboard name when adding new chart from dashboard view * Update import paths * Update test * Fix test
This commit is contained in:
committed by
GitHub
parent
9646591d24
commit
3e3fbccdcb
@@ -678,12 +678,17 @@ function mapStateToProps(state) {
|
||||
const chartKey = Object.keys(charts)[0];
|
||||
const chart = charts[chartKey];
|
||||
|
||||
let dashboardId = Number(explore.form_data?.dashboardId);
|
||||
if (Number.isNaN(dashboardId)) {
|
||||
dashboardId = undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
isDatasourceMetaLoading: explore.isDatasourceMetaLoading,
|
||||
datasource: explore.datasource,
|
||||
datasource_type: explore.datasource.type,
|
||||
datasourceId: explore.datasource_id,
|
||||
dashboardId: explore.form_data ? explore.form_data.dashboardId : undefined,
|
||||
dashboardId,
|
||||
controls: explore.controls,
|
||||
can_overwrite: !!explore.can_overwrite,
|
||||
can_add: !!explore.can_add,
|
||||
|
||||
Reference in New Issue
Block a user