fix: disabled signing pad when submitting form (#842)

fixes : #810
This commit is contained in:
Apoorv Taneja
2024-01-24 11:42:33 +05:30
committed by GitHub
parent 51d140cf9a
commit b115d85fb7
+4 -2
View File
@@ -112,7 +112,6 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => {
</Label> </Label>
<Input id="email" type="email" className="bg-muted mt-2" value={user.email} disabled /> <Input id="email" type="email" className="bg-muted mt-2" value={user.email} disabled />
</div> </div>
<FormField <FormField
control={form.control} control={form.control}
name="signature" name="signature"
@@ -122,7 +121,10 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => {
<FormControl> <FormControl>
<SignaturePad <SignaturePad
className="h-44 w-full" className="h-44 w-full"
containerClassName="rounded-lg border bg-background" containerClassName={cn(
'rounded-lg border bg-background',
isSubmitting ? 'pointer-events-none opacity-50' : null,
)}
defaultValue={user.signature ?? undefined} defaultValue={user.signature ?? undefined}
onChange={(v) => onChange(v ?? '')} onChange={(v) => onChange(v ?? '')}
/> />