This is an automated email from the ASF dual-hosted git repository.

ppawar pushed a commit to branch ATLAS-5115
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 4342ef120052a9c5aec58fa501ff7c427c1218b4
Author: Prasad Pawar <[email protected]>
AuthorDate: Mon Sep 22 13:58:11 2025 +0530

    ATLAS-5115: [REACT UI] When assigning classification, Add button can be 
enabled without selecting classification.
---
 dashboard/src/components/DialogShowMoreLess.tsx |  1 +
 dashboard/src/components/Modal.tsx              |  4 ++--
 dashboard/src/views/Classification/AddTag.tsx   | 12 ++++++++++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/dashboard/src/components/DialogShowMoreLess.tsx 
b/dashboard/src/components/DialogShowMoreLess.tsx
index ba9b37322..fc48807fc 100644
--- a/dashboard/src/components/DialogShowMoreLess.tsx
+++ b/dashboard/src/components/DialogShowMoreLess.tsx
@@ -540,6 +540,7 @@ const DialogShowMoreLess = ({
           button2Label="Remove"
           button2Handler={handleRemove}
           disableButton2={removeLoader}
+          isDirty={true}
         >
           {relatedTerm ? (
             <Typography fontSize={15}>
diff --git a/dashboard/src/components/Modal.tsx 
b/dashboard/src/components/Modal.tsx
index a561d8aaa..75682d277 100644
--- a/dashboard/src/components/Modal.tsx
+++ b/dashboard/src/components/Modal.tsx
@@ -171,12 +171,12 @@ export const CustomModal: React.FC<CustomModalProps> = ({
                     })
                   }}
                   startIcon={
-                    disableButton2 && (
+                    disableButton2 && isDirty ? (
                       <CircularProgress
                         sx={{ color: "white", fontWeight: "600" }}
                         size="14px"
                       />
-                    )
+                    ) : undefined
                   }
                   onClick={(e: Event) => {
                     e.stopPropagation();
diff --git a/dashboard/src/views/Classification/AddTag.tsx 
b/dashboard/src/views/Classification/AddTag.tsx
index 3c72645c3..0863dfe6b 100644
--- a/dashboard/src/views/Classification/AddTag.tsx
+++ b/dashboard/src/views/Classification/AddTag.tsx
@@ -353,8 +353,16 @@ const AddTag = (props: {
       button2Label={`${isAdd ? "Add" : "Update"}`}
       maxWidth="md"
       button2Handler={handleSubmit(onSubmit)}
-      disableButton2={isEmpty(classificationData) ? true : isSubmitting}
-      isDirty={isEmpty(classificationData) ? true : isDirty}
+      disableButton2={
+        isEmpty(classificationData) ? true : isSubmitting
+      }
+      isDirty={
+        isEmpty(classificationData)
+          ? false
+          : isAdd
+          ? !isEmpty(tagName)
+          : true
+      }
     >
       <form onSubmit={handleSubmit(onSubmit)}>
         <Stack>

Reply via email to