Live: show popup if local changes exist (#36093)

* change tracker

* not needed
This commit is contained in:
Ryan McKinley
2021-09-20 09:28:46 -07:00
committed by GitHub
parent fcbcfd232b
commit a6fbb8d724
4 changed files with 22 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ export const useDashboardSave = (dashboard: DashboardModel) => {
useEffect(() => {
if (state.value) {
dashboard.version = state.value.version;
dashboard.clearUnsavedChanges();
// important that these happen before location redirect below
appEvents.publish(new DashboardSavedEvent());
appEvents.emit(AppEvents.alertSuccess, ['Dashboard saved']);