From bb1af0dbbdb18ca64493eb4acdbe692dee32f66c Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Fri, 10 Apr 2026 10:37:40 +0200 Subject: [PATCH] fix: correctly track hasUnsavedChanges when only 1 pending change remains --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 2f2aca0..d0c2806 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -281,7 +281,7 @@ export default function App() { setAppState(prev => { const newData = [...prev.data]; newData[pending.rowIndex] = pending.originalData; - const stillPending = Object.keys(pendingRows).length > 1; + const stillPending = Object.keys(pendingRows).length > 0; return { ...prev, data: newData, hasUnsavedChanges: stillPending }; }); setPendingRows(prev => { const n = { ...prev }; delete n[articleNo]; return n; });