Skip to content

Commit

Permalink
#2496: fixed delete button so that it is gray from the start (using i…
Browse files Browse the repository at this point in the history
…sValid)
  • Loading branch information
vsp05 committed Jun 9, 2024
1 parent 701e09e commit fe9ec85
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const DeleteWorkPackageView: React.FC<DeleteWorkPackageViewProps> = ({ workPacka
handleSubmit,
control,
reset,
formState: { errors }
formState: { errors, isValid }
} = useForm({
resolver: yupResolver(schema),
defaultValues: {
Expand All @@ -56,8 +56,8 @@ const DeleteWorkPackageView: React.FC<DeleteWorkPackageViewProps> = ({ workPacka
handleUseFormSubmit={handleSubmit}
onFormSubmit={onSubmitWrapper}
formId="delete-wp-form"
disabled={!isValid}
showCloseButton
disabled={errors.wbsNum !== undefined}
>
<Typography sx={{ marginBottom: '1rem' }}>
Are you sure you want to delete work package #{wbsPipe(workPackage)}?
Expand Down

0 comments on commit fe9ec85

Please sign in to comment.