Skip to content

Commit

Permalink
fix blocked services submit
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKamalov committed Feb 14, 2025
1 parent 4dfa536 commit 1c8917f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/components/Filters/Services/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export const Form = ({ initialValues, blockedServices, processing, processingSet
handleSubmit,
control,
setValue,
formState: { isSubmitting, isDirty },
formState: { isSubmitting },
} = useForm<FormValues>({
mode: 'onBlur',
defaultValues: initialValues,
});

const handleToggleAllServices = (isSelected: boolean) => {
const handleToggleAllServices = async (isSelected: boolean) => {
blockedServices.forEach((service: BlockedService) => setValue(`blocked_services.${service.id}`, isSelected));
};

Expand Down Expand Up @@ -91,7 +91,7 @@ export const Form = ({ initialValues, blockedServices, processing, processingSet
type="submit"
data-testid="blocked_services_save"
className="btn btn-success btn-standard btn-large"
disabled={isSubmitting || !isDirty || processing || processingSet}>
disabled={isSubmitting || processing || processingSet}>
<Trans>save_btn</Trans>
</button>
</div>
Expand Down

0 comments on commit 1c8917f

Please sign in to comment.