diff --git a/frontend/src/store/actions/dashboard/saveDashboard.ts b/frontend/src/store/actions/dashboard/saveDashboard.ts index 9bbba4c1de..e14e40b737 100644 --- a/frontend/src/store/actions/dashboard/saveDashboard.ts +++ b/frontend/src/store/actions/dashboard/saveDashboard.ts @@ -18,6 +18,7 @@ export const SaveDashboard = ({ title, widgetId, dashboardId, + yAxisUnit, }: SaveDashboardProps): ((dispatch: Dispatch) => void) => { return async (dispatch: Dispatch): Promise => { try { @@ -39,6 +40,7 @@ export const SaveDashboard = ({ const updatednullZeroValues = nullZeroValues; const updatedopacity = opacity; const updatedtimePreferance = timePreferance; + const updatedYAxisUnit = yAxisUnit; const selectedWidgetIndex = data.widgets?.findIndex( (e) => e.id === widgetId, @@ -74,6 +76,7 @@ export const SaveDashboard = ({ opacity: updatedopacity, title: updatedTitle, timePreferance: updatedtimePreferance, + yAxisUnit: updatedYAxisUnit, queryData: { ...selectedWidget.queryData, data: [ diff --git a/frontend/src/store/reducers/dashboard.ts b/frontend/src/store/reducers/dashboard.ts index ef15a2b55c..7e46a21d3c 100644 --- a/frontend/src/store/reducers/dashboard.ts +++ b/frontend/src/store/reducers/dashboard.ts @@ -357,6 +357,7 @@ const dashboard = ( case SAVE_SETTING_TO_PANEL_SUCCESS: { const selectedDashboard = action.payload; + return { ...state, dashboards: [