From 061a3b260a4efc7fa64ce07a741966a19c0d2a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Tue, 19 May 2026 15:42:04 +0200 Subject: [PATCH] Update SaveDialog to add missing type information Add missing type information for the setError and handleSaveClick functions. With types it is easier to know what's expected. --- src/web/components/dialog/SaveDialog.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/web/components/dialog/SaveDialog.tsx b/src/web/components/dialog/SaveDialog.tsx index eb9e68752b..ebaf8ff88b 100644 --- a/src/web/components/dialog/SaveDialog.tsx +++ b/src/web/components/dialog/SaveDialog.tsx @@ -72,7 +72,7 @@ const SaveDialog = ({ setIsLoading(false); }, [error]); - const setError = err => { + const setError = (err: Error) => { setIsLoading(false); if (onError) { @@ -82,7 +82,7 @@ const SaveDialog = ({ } }; - const handleSaveClick = state => { + const handleSaveClick = (state: TValues & TDefaultValues) => { if (onSave && !isLoading) { const promise = onSave(state); if (isFunction(promise?.then)) { @@ -104,7 +104,6 @@ const SaveDialog = ({ {({state, onValueChange}) => { const childValues = {...state, ...values}; - return (