Added disabled prop in save button

File: EventTypeSingleLayout.tsx
If no input field is changed then 'save' button will be disabled.
This commit is contained in:
soham2k06 2024-01-09 15:56:21 +05:30 committed by GitHub
parent 5690718e7f
commit 37652190d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,6 +412,7 @@ function EventTypeSingleLayout({
className="ml-4 lg:ml-0"
type="submit"
loading={isUpdateMutationLoading}
disabled={!formMethods.formState.isDirty}
data-testid="update-eventtype"
form="event-type-form">
{t("save")}