From 049b9bdd53bda50f3f2f480f1c4b20c7e81a2bb0 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Tue, 8 Aug 2023 15:24:11 +0200 Subject: [PATCH] Show save button only when modifications are made --- geneit_app/src/routes/family/FamilyMemberRoute.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geneit_app/src/routes/family/FamilyMemberRoute.tsx b/geneit_app/src/routes/family/FamilyMemberRoute.tsx index 070bd5e..40b6467 100644 --- a/geneit_app/src/routes/family/FamilyMemberRoute.tsx +++ b/geneit_app/src/routes/family/FamilyMemberRoute.tsx @@ -186,6 +186,7 @@ export function MemberPage(p: { const cancel = async () => { if ( + changed && !(await confirm( "Voulez-vous vraiment retirer les modifications apportées ? Celles-ci seront perdues !" )) @@ -240,9 +241,9 @@ export function MemberPage(p: { )} {/* Save button */} - {p.editing && ( + {p.editing && changed && (