Skip to content

Commit 326460b

Browse files
authored
[Dashboard] Save button is disabled in case of save error (#227091)
Closes #221579 Added an early return to ensure the `hasUnsavedChanges` flag remains true when `saveDashboardState` returns an error. The video below shows the behavior after the fix. https://github.com/user-attachments/assets/c6a1d914-6030-44a3-bcd5-2b801d78b97a
1 parent ce4b93b commit 326460b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/platform/plugins/shared/dashboard/public/dashboard_api/get_dashboard_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ export function getDashboardApi({
205205
lastSavedId: savedObjectId$.value,
206206
});
207207

208+
if (saveResult?.error) return;
208209
unsavedChangesManager.internalApi.onSave(dashboardState, searchSourceReferences);
209210
references$.next(saveResult.references);
210211

0 commit comments

Comments
 (0)