mirror of
https://github.com/apache/superset.git
synced 2024-09-18 11:39:49 -04:00
fix: Form data was not being passed to save/update slice (#22989)
This commit is contained in:
parent
ae155611dc
commit
c9b9b7404a
@ -198,6 +198,8 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { url_params, ...formData } = this.props.form_data || {};
|
||||||
|
|
||||||
let dashboard: DashboardGetResponse | null = null;
|
let dashboard: DashboardGetResponse | null = null;
|
||||||
if (this.state.newDashboardName || this.state.saveToDashboardId) {
|
if (this.state.newDashboardName || this.state.saveToDashboardId) {
|
||||||
let saveToDashboardId = this.state.saveToDashboardId || null;
|
let saveToDashboardId = this.state.saveToDashboardId || null;
|
||||||
@ -216,14 +218,13 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {
|
|||||||
sliceDashboards = sliceDashboards.includes(dashboard.id)
|
sliceDashboards = sliceDashboards.includes(dashboard.id)
|
||||||
? sliceDashboards
|
? sliceDashboards
|
||||||
: [...sliceDashboards, dashboard.id];
|
: [...sliceDashboards, dashboard.id];
|
||||||
const { url_params, ...formData } = this.props.form_data || {};
|
formData.dashboards = sliceDashboards;
|
||||||
this.props.actions.setFormData({
|
|
||||||
...formData,
|
|
||||||
dashboards: sliceDashboards,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets the form data
|
||||||
|
this.props.actions.setFormData({ ...formData });
|
||||||
|
|
||||||
// Update or create slice
|
// Update or create slice
|
||||||
let value: { id: number };
|
let value: { id: number };
|
||||||
if (this.state.action === 'overwrite') {
|
if (this.state.action === 'overwrite') {
|
||||||
|
Loading…
Reference in New Issue
Block a user