From f339a4d1ecd5afdc422b5ba099cb1944c68a1436 Mon Sep 17 00:00:00 2001 From: alexandre Date: Sun, 23 Jul 2023 18:38:25 +0200 Subject: [PATCH 1/2] do not select logos with a value --- src/pages/logos/LogoAnnotation.jsx | 4 +++- src/pages/logos/LogoDeepSearch.jsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/logos/LogoAnnotation.jsx b/src/pages/logos/LogoAnnotation.jsx index e4ff1abe4..795f6286e 100644 --- a/src/pages/logos/LogoAnnotation.jsx +++ b/src/pages/logos/LogoAnnotation.jsx @@ -189,7 +189,9 @@ export default function LogoAnnotation() { return { ...state, logos: state.logos.map((logo) => - shouldBeSet[logo.id] + shouldBeSet[logo.id] && + logo.annotation_type === null && + logo.annotation_value === null ? { ...logo, selected: newSelectedState, diff --git a/src/pages/logos/LogoDeepSearch.jsx b/src/pages/logos/LogoDeepSearch.jsx index ee5567c8d..49921cc34 100644 --- a/src/pages/logos/LogoDeepSearch.jsx +++ b/src/pages/logos/LogoDeepSearch.jsx @@ -252,7 +252,9 @@ export default function LogoSearch() { ids.forEach((id) => (shouldBeSet[id] = true)); return logos.map((logo) => - shouldBeSet[logo.id] + shouldBeSet[logo.id] && + logo.annotation_type === null && + logo.annotation_value === null ? { ...logo, selected: newSelectedState, From 441c3f956119004957290aca41077fe275546758 Mon Sep 17 00:00:00 2001 From: alexandre Date: Sun, 23 Jul 2023 18:41:23 +0200 Subject: [PATCH 2/2] fix select all --- src/pages/logos/LogoAnnotation.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/logos/LogoAnnotation.jsx b/src/pages/logos/LogoAnnotation.jsx index 795f6286e..f7e120c46 100644 --- a/src/pages/logos/LogoAnnotation.jsx +++ b/src/pages/logos/LogoAnnotation.jsx @@ -207,7 +207,8 @@ export default function LogoAnnotation() { ...prevState, logos: prevState.logos.map((logo, index) => { if (logo.annotation_value === null) { - logo.selected = true; + logo.selected = + logo.annotation_type === null && logo.annotation_value === null; } return logo; }),