This is an automated email from the ASF dual-hosted git repository.
ppawar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new a5dbe023e ATLAS-5115: [REACT UI] When assigning classification, Add
button can be enabled without selecting classification. (#450)
a5dbe023e is described below
commit a5dbe023ec56c5704e2a21d4cac990cd85c7e71f
Author: Prasad Pawar <[email protected]>
AuthorDate: Thu Sep 25 17:49:34 2025 +0530
ATLAS-5115: [REACT UI] When assigning classification, Add button can be
enabled without selecting classification. (#450)
---
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>