diff --git a/public/app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer.tsx b/public/app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer.tsx index 1e5c0d5dfdf..efd7839824f 100644 --- a/public/app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer.tsx +++ b/public/app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer.tsx @@ -18,6 +18,7 @@ export const SaveDashboardDrawer = ({ dashboard, onDismiss, onSaveSuccess, isCop const previous = dashboard.getOriginalDashboard(); const isProvisioned = dashboard.meta.provisioned; const isNew = dashboard.version === 0; + const hasUnsavedFolderChange = Boolean(dashboard.meta.hasUnsavedFolderChange); const [errorIsHandled, setErrorIsHandled] = useState(false); const data = useMemo(() => { @@ -40,9 +41,9 @@ export const SaveDashboardDrawer = ({ dashboard, onDismiss, onSaveSuccess, isCop clone, diff, diffCount, - hasChanges: diffCount > 0 && !isNew, + hasChanges: (diffCount > 0 || hasUnsavedFolderChange) && !isNew, }; - }, [dashboard, previous, options, isNew]); + }, [dashboard, previous, options, isNew, hasUnsavedFolderChange]); const [showDiff, setShowDiff] = useState(false); const { state, onDashboardSave } = useDashboardSave(isCopy);