fix(SaveModal): Update chart state when saving in explore (#36441)

This commit is contained in:
Mehmet Salih Yavuz
2025-12-05 20:26:10 +03:00
committed by GitHub
parent 236e000398
commit fb2826f92e

View File

@@ -46,7 +46,10 @@ import { canUserEditDashboard } from 'src/dashboard/util/permissionUtils';
import { setSaveChartModalVisibility } from 'src/explore/actions/saveModalActions';
import { SaveActionType } from 'src/explore/types';
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
import { removeChartState } from 'src/dashboard/actions/dashboardState';
import {
removeChartState,
updateChartState,
} from 'src/dashboard/actions/dashboardState';
import { Dashboard } from 'src/types/Dashboard';
// Session storage key for recent dashboard
@@ -177,6 +180,7 @@ class SaveModal extends Component<SaveModalProps, SaveModalState> {
async saveOrOverwrite(gotodash: boolean) {
this.setState({ isLoading: true });
this.props.dispatch(updateChartState(this.props.form_data?.table_state));
// Create or retrieve dashboard
type DashboardGetResponse = {