mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -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;
|
||||
if (this.state.newDashboardName || this.state.saveToDashboardId) {
|
||||
let saveToDashboardId = this.state.saveToDashboardId || null;
|
||||
@ -216,14 +218,13 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {
|
||||
sliceDashboards = sliceDashboards.includes(dashboard.id)
|
||||
? sliceDashboards
|
||||
: [...sliceDashboards, dashboard.id];
|
||||
const { url_params, ...formData } = this.props.form_data || {};
|
||||
this.props.actions.setFormData({
|
||||
...formData,
|
||||
dashboards: sliceDashboards,
|
||||
});
|
||||
formData.dashboards = sliceDashboards;
|
||||
}
|
||||
}
|
||||
|
||||
// Sets the form data
|
||||
this.props.actions.setFormData({ ...formData });
|
||||
|
||||
// Update or create slice
|
||||
let value: { id: number };
|
||||
if (this.state.action === 'overwrite') {
|
||||
|
Loading…
Reference in New Issue
Block a user