From aba55c99f6a956affdcbe94efe9bd99a4e6de2cd Mon Sep 17 00:00:00 2001 From: sumn2u Date: Mon, 29 Jul 2024 08:46:09 -0500 Subject: [PATCH] disable save btn on absence of images and labels --- client/src/MainLayout/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/MainLayout/index.jsx b/client/src/MainLayout/index.jsx index 08ab129..355f6e4 100644 --- a/client/src/MainLayout/index.jsx +++ b/client/src/MainLayout/index.jsx @@ -185,7 +185,8 @@ export const MainLayout = ({ !nextImage || (nextImage.regions && nextImage.regions.length > 0) const selectedImages = state.images.filter((image) => image.selected) const hasRegions = state.images[state.selectedImage]?.regions?.length > 0 - const disableRegion = hasRegions ? false : !state.hasNewChange + const disableRegion = !(state.images.length > 0 && state.regionClsList.length > 0); // enable save button for all cases + // hasRegions ? false : !state.hasNewChange return (